element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Avnet Boards Forums
  • Products
  • Dev Tools
  • Avnet Boards Community
  • Avnet Boards Forums
  • More
  • Cancel
Avnet Boards Forums
MaaXBoard Hardware Design MaaXBoard-RT: SDK examples for you - my experience
  • Forum
  • Documents
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Avnet Boards Forums to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 9 replies
  • Subscribers 323 subscribers
  • Views 1958 views
  • Users 0 members are here
  • board
  • Flash Loader
  • examples
  • MaaXBoard-RT
  • xip
  • sdk
Related

MaaXBoard-RT: SDK examples for you - my experience

tjaekel
tjaekel over 2 years ago

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)
    U
    SB 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:

https://www.avnet.com/wps/wcm/connect/onesite/15a1365e-b32e-488a-b355-e4c795934926/MaaXBoard+RT+User+Guide+%28v1.0%29.pdf?MOD=AJPERES&CACHEID=ROOTWORKSPACE.Z18_NA5A1I41L0ICD0ABNDMDDG0000-15a1365e-b32e-488a-b355-e4c795934926-nM9ynBT

Just what I have realized:

  1. 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.
  2. My "Edit Project Settings" -> "C/C++ Build" -> "MCU Settings" looks like this:
    MCU Settings
  3. 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!).

  4. The Debug UART is LPUART1 (not 6)
  5. 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...

  • Sign in to reply
  • Cancel

Top Replies

  • tjaekel
    tjaekel over 2 years ago in reply to tjaekel +2
    the link to XML file does not work, try again to attach here the file... community.element14.com/.../8535.MCU_5F00_memory_5F00_regions.xml
  • tjaekel
    tjaekel over 2 years ago +1
    The next SDK project works on MaaXBoard-RT: tjaekel/MaaXBoard-RT_lwip_httpsrv_freertos_cm7: MaaxBoard RT HTTP server with FreeRTOS (github.com) It is changed to 100M PHY and connector. 1G PHY on board…
  • tjaekel
    tjaekel over 2 years ago +1
    The next SDK project works on MaaXBoard-RT: tjaekel/MaaXBoard-RT_lpspi_edma_b2b_transfer_master_cm7: MaaXBoard-RT LPSPI4 demo (github.com) The LPSPI4 (as SPI on J1 header), plus GPIO INT Demo. See…
  • tjaekel
    tjaekel over 2 years ago

    The next SDK project works on MaaXBoard-RT:

    tjaekel/MaaXBoard-RT_lwip_httpsrv_freertos_cm7: MaaxBoard RT HTTP server with FreeRTOS (github.com)

    It is changed to 100M PHY and connector.
    1G PHY on board is different: still to modify project to use also 1G ETH connector
    (take it from "golden reference", "out-of-box" demo, merge it to this project...

    Why did it crash?

    The original project has crashed immediately in ResetHandler, when the INTs were enabled.
    The reason was:
    During the initialization of memory sectors, esp. .bss section and fill with zeros - there was one write to a non-existing memory (0x83000000).

    Right after INT enable, inside ResetHandler() - the BusFault_Handler() was triggered. It was pending due to wrong .bss initialization and kicked in
    immediately after INT enable.

    Main reason and fix:

    Check carefully which memories are used, in the "MCU Setting". It is not enough just to modify Flash and SDRAM size, just: also check carefully if any other memory region
    is used and invalid!
    When you setup an SDK project, this "MCU Setting" is taken from SDK examples and might be still wrong!

    wrong MCU Settings

    You can use "Import" (and "Export"):
    Export from a working project, e.g. "out-of-box" demo and import
    (or import my XML file here, see in next post).

    It works for me, with 100M connector.
    Just modify the IP address used for your network.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • tjaekel
    tjaekel over 2 years ago in reply to tjaekel

    the link to XML file does not work, try again to attach here the file...

    Fullscreen 8535.MCU_memory_regions.xml Download
    <info flash_driver='MaaXBoard_S26KS256.cfx'>
     <chip>
      <memory id='Flash' type='Flash' is_ro='true' can_program='true'></memory>
      <memory id='RAM' type='RAM'></memory>
       <memoryInstance id='BOARD_FLASH' derived_from='Flash' location='0x30000000' size='0x2000000' driver='${workspace_loc:}/${ProjName}/xip/MaaXBoard_S26KS256.cfx'  edited='true'  />
       <memoryInstance id='BOARD_SDRAM' derived_from='RAM' location='0x80000000' size='0x2000000'   edited='true'  />
       <memoryInstance id='SRAM_OC1' derived_from='RAM' location='0x20240000' size='0x80000'   edited='true'  />
       <memoryInstance id='SRAM_OC2' derived_from='RAM' location='0x202c0000' size='0x40000'   edited='true'  />
       <memoryInstance id='NCACHE_REGION' derived_from='RAM' location='0x20300000' size='0x40000'   edited='true'  />
       <memoryInstance id='SRAM_OC_ECC1' derived_from='RAM' location='0x20340000' size='0x10000'   edited='true'  />
       <memoryInstance id='SRAM_OC_ECC2' derived_from='RAM' location='0x20350000' size='0x10000'   edited='true'  />
       <memoryInstance id='SRAM_DTC_cm7' derived_from='RAM' location='0x20000000' size='0x40000'   edited='true'  />
       <memoryInstance id='SRAM_ITC_cm7' derived_from='RAM' location='0x0' size='0x40000'   edited='true'  />
     </chip>
    </info>
    

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Cancel
  • tjaekel
    tjaekel over 2 years ago

    A new working project: the DualCore demo from SDK, with RPC (using FreeRTOS):

    tjaekel/MaaXBoard-RT_erpc_two_way_rpc_rpmsg_rtos_cm4: DualCore RCP demo, from SDK, bi-directional RPC with FreeRTOS (github.com)

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • tjaekel
    tjaekel over 2 years ago

    The next SDK project works on MaaXBoard-RT:

    tjaekel/MaaXBoard-RT_lpspi_edma_b2b_transfer_master_cm7: MaaXBoard-RT LPSPI4 demo (github.com)

    The LPSPI4 (as SPI on J1 header), plus GPIO INT Demo.

    See also this thread:

     MaaXBoard-RT: LPSPI4 and GPIO INT for you 

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • tjaekel
    tjaekel over 2 years ago

    I have now enough SDK examples working and I have started to merge several projects into my one: "MaaXBoard-RT_SPIder":

    Please, find my active project here:

    tjaekel/MaaXBoard-RT_SPIder: MaaXBoard-RT SPIder framework (github.com)

    Experience:

    If you create an SDK example using USB, "both" INT handlers are setup (for every SDK example project), the USB_OTG1_IRQHandler() as well as USB_OTG2_IRQHandler() are defined,
    always and both with calling the same handler.

    OK, it results in an "already defined" error, but which one is which?
    (never both are needed at the same time, even programmed this way in SDK examples).

    If you use USB-C (as USB device only possible):
    implement USB_OTG1_IRQHandler().

    If you use the User USB (the USB-A connector: device and master possible):
    implement USB_OTG2_IRQHandler().

    Summary:

    I have all the SDK examples (as building blocks) for my project working.
    I will stop to comment here, not adding more comments here.

    It was working fine to import SDK examples, to modify those to make them working as well as to merge now several projects together for "my project"
    (I have merged: SPI example, USB VCP example, USB Memory device example, using FreeRTOS...).

    If you like: track my progress on GitHub:

    tjaekel/MaaXBoard-RT_SPIder: MaaXBoard-RT SPIder framework (github.com)

    Enjoy the MaaXBoard-RT (as I do).

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • tjaekel
    tjaekel over 2 years ago in reply to tjaekel

    BTW:

    if you need the latest files, in "board", esp. file "pin_mux.c", you can get it from my project:

    tjaekel/MaaXBoard-RT_SPIder: MaaXBoard-RT SPIder framework (github.com)

    Every new SDK Example comes with a "reduced" file "pin_mux.c":
    Not all pins are configured, just the ones needed for THIS example.

    If you merge projects - you have to merge also the code in "void BOARD_InitPins(void)"!
    (check if all pins/features needed are also configured, this file "accumulates" all pin configs needed)

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • tjaekel
    tjaekel over 2 years ago

    I have now both PHYs working, the 100M and the 1G (a different PHY chip used).
    I can access with two web browsers to both ports, also the mDNS is working (using a name, like "maaxboard" vs. "maaxboardg".

    The project is here:

    GitHub - tjaekel/MaaXBoard-RT_SPIder: MaaXBoard-RT SPIder framework

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • tjaekel
    tjaekel over 2 years ago

    When you try to merge two SDK examples together into one project:

    • watch out which method is used to allocate stack for FreeRTOS:
      look at: "FreeRTOSConfig.h" and #define configFRTOS_MEMORY_SCHEME 3  //or 4?
    • Select which file. e.g. "${ProjDir}/freertos/freertos-kernel/portable/MemMang/heap_3.c" is used (or heap4.c - just one of them):
      disable the not used files via "Resource Configurations" -> "Exclude from build..." (or enable the other one needed)
    • Watch on the SDK example - which should work, the memory configuration, esp. watch for:
      project "Properties" -> "C/C++ Build" -> "Settings" -> "MCU Linker" -> "Managed Linker Script"
      if you have at least the same size for "Heap"
      If your project crashes or does not work as expected, potentially the memory regions have a wrong size (often Heap is too small).

    If all is compile clean, but it crashes or does not work during run-time: potentially the "Heap" and "Stack" size are wrong (too small).
    Watch the debug console (this MCU-LINK UART): it might give you a hint (e.g. it enters "assert" or a "__BKPT").

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • tjaekel
    tjaekel over 2 years ago

    The SDK example "wifi_cli_cm7" works:

    GitHub - tjaekel/MaaXBoard-RT_wifi_cli_cm7: MaaXBoard-RT with WIFI demo (connect to AP, provide an AP)

    Just change in file "app_config.h" (done):

    //#define WIFI_IW416_BOARD_MURATA_1XK_M2
    #define WIFI_88W8987_BOARD_MURATA_1ZM_USD

    The board needs a reset or power-cycle (Murata WiFi chip not reset):
    a new debug session (and FW flashed) - the chip cannot be initialized.
    But the project FW works fine after resetting the board.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube