Commit Graph

35560 Commits

Author SHA1 Message Date
Gregory Nutt
73b86ee458 include/netpacket/netlink.h: General clean-up and re-organization. 2019-11-12 13:27:19 -06:00
Gregory Nutt
9d6c607afc net/netlink/netlink_route.c: Add some comments. 2019-11-12 10:36:05 -06:00
Gregory Nutt
3e1937b49b net/netlink: Add options to disable individual NETLINK_ROUTE commands. This will probably become quite large and will need to be higher tunable for smaller platforms. 2019-11-12 10:19:42 -06:00
Dave Marples
b49b07cb75 rch/arm/src/imxrt/imxrt_serial.c: o, just to complete the documentation of this...it looks like two issues, which confused me greatly;
1) Operational issue

TC (Transmission complete) and TDRE (TX Buffer Empty) were transposed in imxrt_serial.c.  The end result was that for unoptimised code everything worked fine, but optimised code got itself into a real mess and continually fired interrupts.  The patch attached fixes this. This one would have been found much more quickly if this particular board had supported SWO :-/

2) Startup issue

There are a number of chip errata that apply to the 1052 first revision (A-suffix) that don't apply to the second (B-suffix). Those got me for a while and it's important to use an EVK_B_ dev board if you're suffering stability problems with this particular chip. However, even with that resolved with either optimised or unoptimised code when there is no SNVS (Battery Backup) power and the power is switched on the CPU appears to boot but gets stuck with timer interrupts not being generated. The CPU is running and it will execute linear code.   I have determined this by putting an 'imxrt_lowputc('A'+irq)' into up_doirq. For the non-running case the output looks like this;

LLLL

this implies 4 0x0b interrupts have been generated, and nothing else. If I hit keys on the keyboard I get 'e' in the flow.  0x0b is the SVC instruction and is the mechanism by which NuttX handles task switching.  'e' is 0x24, which corresponds to the LPUART1 interrupt.  Other than these, the system does not respond further but is happily in the idle loop.  In this circumstance if you hit SW2 on the EVKB board though the logjam 'unjams' and normal service is established, output now looks like;

LLLLPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPLPP ...etc.

Where 'P' is 0x0f (the SYSTICK interrupt)....this is what _should_ be happening so; SYSTICK starts up after SW2 has been pressed.

From this point on everything works correctly and you can reboot the CPU, put new code into it or do whatever you wish, **provided power is not cycled off**. If power is cycled off then return to the top and go through the process again.

When there is SNVS power to the CPU then power can be switched on and off as you wish, and the CPU will boot correctly. This has been determined by putting 3V onto J6.

I think we are probably doing something naughty with the way we are starting the clocks to the timers.  There are certainly some restrictions on imxrt clock manipulation which we have studiously avoided. I am investigating further and have some potential patches but even if I find the root cause it should not be included in 8.2 as the change could be disruptive.
2019-11-12 09:05:25 -06:00
ligd
efaba3be7d drivers/mtd/gd25.c: Add gd25_lock/unlock to case: enable 4-bytes address. 2019-11-12 09:02:19 -06:00
ligd
bf98b28737 drivers/mtd/gd25.c: Add gd25_lock/unlock to case: enable 4-bytes address 2019-11-12 09:01:10 -06:00
Dave Marples
2ba7ce75d7 arch/arm/src/imxrt/imxrt_idle.c: Y'all remember that conversation we had about why WFI might have been disabled on imxrt? Well, looks like we found the reason;
https://github.com/zephyrproject-rtos/zephyr/pull/8535/commits:  "The imxrt1050 is configured to use SYSTICK for the kernel timer, but SYSTICK cannot wake up the soc from low-power modes. Disable low-power modes on this soc until we have support for an alternative timer."

    "This fixes k_sleep on the EVKB version of the mimxrt1050_evk board. An earlier version of the board (EVK, not EVKB), had A0 silicon which by default did not enter low-power mode on a wfi."

This patch reverts the WFI enable for further investigation post 8.2.  With this patch in place together with the previous one my system is fully stable(*), just drinking a bit more power than I'd like.
2019-11-12 08:52:21 -06:00
ligd
a3646986ea drivers/power/activity_governor.c: Fix timer can't start when meet very small pmtick. 2019-11-12 08:18:32 -06:00
Alin Jerpelea
64aff3bf6d boards/arm/lpc17xx_40xx/lincoln60/src/lincoln60.h: Fix ifdef string. The old configs folder was migrated to Boards/<arch> and we should fix the ifdef. 2019-11-12 08:13:39 -06:00
Alin Jerpelea
5e8eb7776d boards/arm/imxrt/imxrt1020-evk/src/imxrt1020-evk.h: Fix ifdef string. The old configs folder was migrated to Boards/<arch> and we should fix the ifdef. 2019-11-12 08:12:26 -06:00
Alin Jerpelea
8a7f81f427 boards/renesas/rx65n: Fix ifdef string in header files. The old configs folder was migrated to Boards/<arch> and we should fix the ifdef. 2019-11-12 08:11:16 -06:00
chao.an
b7e8670af1 arch/sim/ and boards/sim/sim/sim: Support OpenAMP between two simulator instances. Please read rpserver/rpproxy section in boards/sim/sim/sim/README.txt for more information. 2019-11-12 08:03:38 -06:00
Gregory Nutt
3811a0f5cc net/netlink/netlink_route.c: Update some comments. 2019-11-12 07:59:43 -06:00
Gregory Nutt
a9b220f169 boards/arm/imxrt/imxrt1020-evk: Make naming of the LED consistent. In most places it is referred to as LED1. In board.h it is referred to as USERLED1. The i.MXRT1020-EVK hardware user guide (HUG) uses the name USERLED. This command makes all names internally consistent and consistent with the HUG. Noted by Alin Jerpelea. 2019-11-11 16:27:53 -06:00
Alin Jerpelea
eb126f58c9 boards/arm/imxrt/imxrt1020-evk: Fix ifdef string. The old configs folder was migrated to Boards/<arch> and we should fix the ifdef. 2019-11-11 16:06:43 -06:00
Gregory Nutt
ecbd5a85d7 net/netlink: Fixes from testing with new apps/examples/netlink_route. 2019-11-11 13:38:11 -06:00
ligd
12b93898d1 drivers/rptun/rptun.c: vring size should also be aligned. 2019-11-11 09:11:17 -06:00
Xiang Xiao
fa264ff7e7 drivers/rptun/rptun.c: Refine the start/stop flow to support the repeat boot. 2019-11-11 09:09:40 -06:00
Xiang Xiao
48de68c474 arch/sim/src/sim/up_hostfs.c: Fix warning: 'mapflags' may be used uninitialized in this function. 2019-11-11 09:01:51 -06:00
Xiang Xiao
5a3d9c7570 arch/sim/src/Makefile: Move all SMP stuff into one place for arch/sim. 2019-11-10 20:42:00 -06:00
Xiang Xiao
a4ce23518e arch/sim/src/sim: Replace all CONFIG_DEV_CONSOLE with USE_DEVCONSOLE for arch/sim and compile up_devconsole.c conditionally. 2019-11-10 20:40:38 -06:00
Xiang Xiao
db8a7ab39c arch/sim/src/sim/up_simuart.c: Remove CONFIG_SIM_UART_DATAPOST for arch/sim. It's very dangerous to call NuttX API from simuart_thread. 2019-11-10 20:38:25 -06:00
Dave Marples
27a6039501 boards/arm/imxrt/imxrt1060-evk: An update to the configuration on imx1060-evk to remove compilation warnings about duplicated definitions. No functional changes. 2019-11-10 20:34:04 -06:00
Gregory Nutt
71a968ad71 net/netlink/netlink_route.c: Add missing routing table list terminating response. 2019-11-10 15:00:05 -06:00
Gregory Nutt
3a8a829088 net/netlink/netlink_route.c: Add support for obtaining the entire routing table. 2019-11-10 14:11:44 -06:00
Gregory Nutt
bda0a9c6a7 net/netlink: Fix offset in rtattr. include/net/route.h: Correct form and naming of sruct rtentry. include/netpacket/netlink.h: Add some definitions that will be needed to access routing tables. 2019-11-10 12:35:15 -06:00
Xiang Xiao
800b08b2aa drivers/rptun/rptun.c: Refine the rptun naming. 2019-11-10 08:45:14 -06:00
Xiang Xiao
a82da37059 openamp/Makefile: Linker input file unused because linking not done. 2019-11-10 08:09:32 -06:00
hao.an
4d64634137 openamp/: Add Makefile defines. 2019-11-10 08:09:32 -06:00
David Sidrane
19015f7e26 Merged in david_s5/nuttx/px4_firmware_nuttx-8.1+_siglewire (pull request #1070)
single wire Allow selection of pull{up|down|none}

* tioctl:Allow selection of pull{up|down|none}

* stm32:Single Wire add pull{up|down|none} tioctl

* stm32f0l0g0:Single Wire add pull{up|down|none} tioctl

* stm32f7:Single Wire add pull{up|down|none} tioctl

* stm32h7:Single Wire add pull{up|down|none} tioctl

* stm32l4:Single Wire add pull{up|down|none} tioctl

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-11-10 12:27:47 +00:00
Gregory Nutt
8c85ecf531 net/netlink/netlink_route.c: Add support for the NETLINK_ROUTE RTM_GETLINK command that is used to obtain a list of all devices in the UP state. 2019-11-09 17:36:30 -06:00
Gregory Nutt
5b47b535a0 boards/arm/imxrt/imxrt10*0-evk/include/board.h: Put all LCD definitions together. 2019-11-09 12:18:13 -06:00
Gregory Nutt
a9ef2b4208 tools/nxstyle.c: Eliminate false positive 'Invalid character after asterisk in comment block'. 2019-11-09 12:10:43 -06:00
Gregory Nutt
a450b85dc8 boards/arm/imxrt/imxrt1020-evk/include/board.h: Revert part of 2b4db647ec. The 1020, has no LCD. 2019-11-09 10:28:28 -06:00
Gregory Nutt
2b4db647ec board/arm/imxrt: Because of that last dumb pin naming change, we now have to define EVERY pin in the board.h head file. How idiotic! 2019-11-09 10:22:45 -06:00
chao.an
f2428edd7d arch/sim/src/nuttx-names.dat: Add host ftruncate() support. 2019-11-09 10:07:07 -06:00
Gregory Nutt
2b00f4505c Merge branch 'master' of bitbucket.org:nuttx/nuttx 2019-11-09 09:56:02 -06:00
Gregory Nutt
731fddd8e3 boards/arm/imxrt/imxrt1020-evk/include/board.h: Fix an error that I introduced with code review. 2019-11-09 09:55:16 -06:00
Gregory Nutt
c2cbcd24a4 Remove some headers from emtpy sections. 2019-11-09 09:19:51 -06:00
Matias Nitsche
e118d99bf5 drivers/power/pm: Historically, the NuttX PM subsystem has consisted of two functional components: (1) an "Upper" part that detects state changes based on a random walk driven by activity levels, and (2) and "lower" part that implementst the state changes.
This change decouples that upper activity-based logic from the lower random walk logic and allows use of other upper state detection logic (such as a custom, application-specific state machine).
2019-11-09 09:09:33 -06:00
Gregory Nutt
2ab4d635b4 tools/nxstyle.c: Correct detection of missing blank line following a block comment. 2019-11-09 08:15:12 -06:00
Dave Marples
4835c4c017 i.MXRT 106x: pinmux change sof the 1060's. 2019-11-08 18:20:14 -06:00
Gregory Nutt
e2905bc69c boards/arm/imxrt/imxrt1020-evk: Run all .c and .h files through tools/nxstyle and fix numerous coding violations. This sucks. The submitter of the patch is responsibile for doing this and dumping this on me is shit. 2019-11-08 17:49:29 -06:00
Dave Marples
aedccfc940 arch/arm/src/imxrt/imxrt_enet.c: Improve naming of Ethernet pins. 2019-11-08 17:33:37 -06:00
Dave Marples
b10737864f boards/arm/imxrt/imxrt1020-evk: Add support for the MIMXRT1021-EVK board. It features nsh, netnsh and usdhc sample configurations. 2019-11-08 17:18:01 -06:00
Dave Marples
15c2951c0d This commit, initially for the imxrt1050, separates out the pinmux and iomux functions cleanly. For ease of conversion default IOMUX definitions have been added into imxrt_iomux.h. The change effectively does two things;
(1) unifies the iomux definitions - previously some pins had them, and some didn't. This effectively made it impossible to use the pinmuxes without editing the header file in the standard distribution tree.

(2) unifies the pin definitions so that every pin now has a suffix. This makes it *much* easier to see when a pin is in use in your code, because it will always have a definition in your board.h file.

For anyone who is already using this CPU, a couple of small changes are needed to existing code;

In respect of (1) add IOMUX decorators to your pin definitions. You will find defaults in haardware/imxrt_iomux.h. Every pin should have a IOMUX decorator and in general the defaults should be OK. So while previously in your board.h file you might have had;

You will now have;

In respect of (2) you will need to add selectors for any function that previously only had one pinning option. There aren't many of those but LPUART1 is a good example. That just means adding into your board.h something like;
2019-11-08 17:08:48 -06:00
Matias N
93e11dacb8 arch/arm/src/stm32l4/stm32l4_idle.c: (1) Added BEGIN_IDLE()/END_IDLE() to stop call so that we also get notification via LED of the STOP mode, (2) Added the stm32l4_clockenable call as previously discussed, and (3) Added call to pm_changestate() to inform drivers we're back to running after the call to stm32l4_stop() returns. 2019-11-08 17:00:16 -06:00
Gregory Nutt
b6756eb5fe Trivial update to some comments. 2019-11-08 12:06:29 -06:00
Gregory Nutt
dbbabcd33c Squashed commit of the following:
net/netlink/netlink_route.c:  Add Netlink socket NETLINK_ROUTE support for getting a snopshot of the Neighbor table.

    net/neighbor/neighbor_snapshot.c:  Add neighbor_snapshot() that will eventually be used by the Netlink sockets.  Also fixed naming violation 'struct neighbor_entry' -> 'struct neighbor_entry_s'.

    include/nuttx/net/neighbor.h:  Expose format of the IPv6 neighbor table for use with Netlink sockets.
2019-11-08 11:16:04 -06:00
David Sidrane
2213904cfd Merged in david_s5/nuttx/px4_firmware_nuttx-8.1+_bbsram_mpu (pull request #1069)
STM32H7:Set the BBSRAM memory range to non-cacheable.

* armv7-m:mpu add user peripheral helper

* stm32h7:BBSRAM Exclude BBSRAM from cacheable when CONFIG_ARMV7M_DCACHE

       ST placed the STM32H7 BBSRAM in the SRAM default memory region
       which is cacheable. This commit sets the BBSRAM memory range
       to non-cacheable.

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-11-08 16:17:28 +00:00