-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
initial support for MSP430FR59xx using the msp430-elf gcc compiler #11012
Conversation
Is this some hardware lying around at INRIA? @aabadie would you take care about this PR? |
I don't have this hardware, sorry. This is not the same CPU as the IoT-LAB MSP430. |
`_demux()` might change `pkt->data` in all kind of ways (moving it due to `gnrc_pktbuf_mark()`, though unlikely; releasing it, because e.g. it starts with a fragment header that marks a fragmented packet containing only one fragment, etc.) so accessing the pointer *after* calling `_demux()` is somewhat playing with fire. This change avoids this by storing the value of `ext_hdr->nh` (all we are interested in here) in a temporary variable that then is used to set the out-parameter `nh`. `protnum` needs to be unchanged before the call to `_demux()` as it was set by the previous iteration and determines what extension header actually is handled.
The VRB also needs to be able to generate new tags for forwarding. This exposes the tag generation.
Update the 'code' section detection to also work on kinetis. The boards using 'cortexm.ld' have the code section starting with '.text'. For the 'cpu/kinetis/kinetis.ls' the first section is '.vector'. Update the 'awk' matching pattern to correctly detect the kinetis boards. It is a dependency to allow testing upcoming offset support with kinetis. I am not 100% sure about the pattern for awk.
Slow implementation to list all supported boards. It is adapted from what `.murdock` does without the `toolchain` handling.
- fcfield is located in memory at 0x400-0x40f. Its content is only read upon reset, therefore if in presence of a bootloader and multiple applications, the fcfield will only be read when the bootloader is loaded. As long as we flash at IMAGE_OFFSET > 0x410 we do not care about the fcfield content since it won't get overwritten.
When '$(PREFIX)objdump' is not present fallback to native '(g)objdump'. 'objdump' is used when flashing for some boards but the toolchain may not be installed when building in docker. This will allow using 'objdump' in 'cpu/kinetis/dist/check-fcfield.sh'.
This allows changing the flashing commands from the outside or in a BSP.
Handle differently variables that are exported in `vars.inc.mk` from the ones that should not. This is needed for the upcoming variables change that should also be removed from `vars.inc.mk` right now. Keeping the old behavior will help migrating other variables more easily by keeping them only exported in vars.inc.mk in the first time.
FLASHER and FFLAGS are evaluated by the main Makefile.include or by file included by it. Their value does not need to be exported. This will also prevent evaluating 'PORT' for FFLAGS when not needed. Testing ------- `git diff --word-diff` only reports `export` being removed. `git show --stat` reports `84 insertions(+), 84 deletions(-)` Which is the same amount as lines that where matching `export[[:blank::]]\+VARIABLE`.
Add sanity check for removed exports.
RESET and RESET_FLAGS are evaluated by the main Makefile.include or by file included by it. Their value does not need to be exported. This will also prevent evaluating 'PORT' for RESET_FLAGS when not needed. Testing ------- `git diff --word-diff` only reports `export` being removed. `git show --stat` reports `24 insertions(+), 24 deletions(-)` Which is the same amount as lines that where matching `export[[:blank::]]\+VARIABLE`.
Add sanity check for removed exports.
DEBUGGER/DEBUGGER_FLAGS/DEBUGSERVER/DEBUGSERVER_FLAGS are evaluated by the main Makefile.include or by file included by it. Their value does not need to be exported. Testing ------- `git diff --word-diff` only reports `export` being removed. `git show --stat` reports `55 insertions(+), 55 deletions(-)` Which is the same amount as lines that where matching `export[[:blank::]]\+VARIABLE`.
Add sanity check for removed exports.
MSPDEBUGFLAGS is evaluated only in the same file. Its value does not need to be exported. This will also prevent evaluating 'PORT' for MSPDEBUGFLAGS when not needed.
PREFLASHER/PREFFLAGS/FLASHDEPS are evaluated by the main Makefile.include. Their value does not need to be exported. Testing ------- `git diff --word-diff` only reports `export` being removed. `git show --stat` reports `16 insertions(+), 16 deletions(-)` Which is the same amount as lines that where matching `export[[:blank::]]\+VARIABLE` plus the newline that is said to have changed.
Add sanity check for removed exports.
To read float number from stdin, add "-u scanf_float" option to the linker. This option is setup using a pseudomodule as it is already done for printf_float. Just add to your Makefile: USEMODULE += scanf_float Signed-off-by: Gilles DOFFE <[email protected]>
This is the last use of FEATURES_MCU_GROUP variable and thus it deprecates it.
Add a function to list deprecated variables or patterns and use it for * FEATURES_MCU_GROUP
The `addr` parameter of the NIB's `_handle_dad()` function can come from anywhere (e.g. in the fallback to classic SLAAC the destination address of the IP header is used), so putting that pointer in a timer is not a good idea. Instead we use the version of the address that is stored within the interface.
The init code for both MCUs is so alike, but it diverged over time. Re-order the code, so that it's the same on both families again.
Clock setup does not belong in the peripheral driver.
leave that to cpu.c
GCLK2 is needed by RTC/RTT, so make it possible to configure it with XOSC32K as source.
- Since the Vector table must be naturally aligned to the next power of two of the amount of supported ISR, and the table will be placed after riotboot_hdr, we must ensure RIOTBOOT_HRD_LEN has the same alignment.
@geromueller I've tried the code from this branch with #12457. I just copied the cpu and board folders there, and did some minor fixups. It compiles fine, but I cannot test... Please see https://github.com/kaspar030/RIOT/tree/msp430fr5969_rebased. The WIP commit is all your code. |
Contribution description
Initial implementation of the MSP430FR5969 (and similar) and the MSP-EXP4305969 Launchpad dev board using the msp430-elf toolchain.
Testing procedure
Tested ipc_pingpong and smaller custom apps. Be aware that the stack size needs to be reduced to prevent memory allocations failures! See cpu/msp430fr59xx/Readme.md
References
The required PR for the msp430-elf toolchain ist here: RIOT-OS/riotdocker#67