FYI,
I tried to bring up more SDK examples to work on MaaXBoard-RT.
This is the list what works for far:
- tjaekel/MaaXBoard-RT_cdc_vcom_freertos_cm7: MaaXBoard-RT VCP UART example (github.com)
USB VCP UART - UART on USB-C - tjaekel/MaaXBoard-RT_shell_cm7: MaaXBoard-RT Shell with command to toggle LEDs (all three) (github.com)
Debug UART with command shell to set all three LEDs On/Off - tjaekel/MaaXBoard-RT_host_msd_fatfs_freertos_cm7: MaaXBoard RT with USB memory stick (github.com)
test USB Memory Stick on USB-A connector - see test log on Debug UART
ATTENTION: it deletes all content on USB Memory Stick! - tjaekel/MaaXBoard-RT-V3--GUI-Demo: "out of the box" MaaXBoard-RT demo (github.com)
the AVNET "out-of-the-box" demo: a bit modified to fix compile and project warnings
Use this project as "golden reference" for files like "board.h", "cdc.c" (but see also below, e.g. "pin_mux.h")
Not working (yet):
- MaaXBoard-RT_lwip_httpsrv_bm_cm7
- MaaXBoard-RT_lwip_httpsrv_freertos_cm7
Both projects crashes during startup: in startup the "bl __main" ends up in a BusFault_Handler.
I have to see and debug: potentially, still a wrong file, e.g. the nor_flash file not updated (or __REDLIB__ vs. __NEWLIB__, or ...).
Experience:
It is not so difficult to generate, flash and run an SDK example (instead evkmimxrt1170, for MaaXBoard-RT)
What to do and what the differences are is pretty well documented in AVNET User Guide:
Just what I have realized:
- The patch for the Flash Loader is slightly different:
You can also put the file "MaaXBoard_S26KS256.cfx" into folder:
.../workspace/.mcuxpressioide_package_supprt/MIMXRT1176xxxxx_support/Flash
and use from there. - My "Edit Project Settings" -> "C/C++ Build" -> "MCU Settings" looks like this:
- The User Guide says: copy "board.h" and "cdc.c" (in addition to the Flash Loader files):
But the "board.h" has different versions - go with the latest one (e.g. debug UART 1 not 6, LED LOGIC_LED_ON vs. OFF values seem to be flipped)
I think:
You have to copy/overwrite also files "pin_mux.c" and "pin_mux.h" in sub-folder "board".
Potentially best: copy all files in "board" from a working project (the "out-of-the-box" demo) into a new project "board" directory.
Otherwise, some files taken from SDK are not correct (e.g. pin_mux is still for EVK board!). - The Debug UART is LPUART1 (not 6)
- Yes: for USB-C as device (only) - it is Ehci0.
For USB-A connector (e.g. as host for USB stick) it is Ehci1
General procedure to generate SDK examples for MaaXBoard-RT:
Have one working "golden reference project", e.g. the "out-of-the-box" demo.
- create a new project "from the SDK examples"
- potentially: copy all content from working "golden reference" in folders "xip" and "board" into same folder names in new project
- modify the Flash Loader via "MCU Settings" - it has to be done on every new project
- compile, flash/debug ...
I hope it helps for you as well.
Coming up with some more projects...