Dear developers in charge of
making MCUXpresso IDE, GNU C/Linker for ARM, and FreeRTOS
play nice with each other:
As a physicist / mixed signal analog IC design PhD,
I do not have, nor do I really want to have, detailed knowledge of the inner workings of FreeRTOS, MCUXpresso, and GNU linker.
I need to put an existing code base for the MIMXRT1170-EVK
(and later on, the MIMXRT1176DVMAA with non-standard hardware extensions)
with lots of shortcuts and workarounds
on a solid foundation, so I can modify the legacy code to use FreeRTOS reliably and consistently.
At the moment, I am trying to modify an existing project
to use one of the FreeRTOS memory management schemes (preferrably, heap4) consistently for implementing lots of queues with variable size, sometimes large (u-blox binary) data packets,
and large matrices (even tensors) for doing linear algebra.
I’m running into serious problems how to modify an existing project
or the example projects from NXP, like evkmimxrt1170_freertos_queue_cm7,
to allocate the FreeRTOS heap (heap4, preferrably)
into 16777216 bytes of memory in external SDRAM section SDRAM_HEAP, see
Due to subtle incompatibilities or undocumented implicit assumptions by FreeRTOS,
which of several possible memory allocation schemes in MCUXpresso / GNU C compiler and linker are supposed to be used,
I do not get the FreeRTOS heap allocated into SDRAM_HEAP and properly recognized by FreeRTOS, let alone the FreeRTOS diagnostics windows in MCUXpresso
- Task List
- Queue List
- Timer List
- Heap Usage
Through trial and error, I got the FreeRTOS MCUXpresso diagnostics windows to work under Windows, but only from time to time under ubuntu 20.04LTS Linux,
but I cannot reproduce what works and what doesn’t.
In discussion forums (FreeRTOS? NXP??),
I expect to find a lot of patches from typical “move fast and break things” that happened to not break immediately,
but can I find someone here
who can tell me how to making FreeRTOS in NXP MCUXpresso based on the GNU compiler/linker under both Linux and Windows
is supposed to work,
i.e., not to meddle with GNU linker scripts that get automatically overwritten by either FreeRTOS or MCUXpresso,
and get the “move fast and break things” legacy code configured as intended by the designers?
The “pass the bucket to the linker” statement
How the array is placed at a specific memory location is dependent on the compiler being used - refer to your compiler’s documentation.
uint8_t ucHeap[ configTOTAL_HEAP_SIZE ];
in the FreeRTOS
APPLICATION_ALLOCATED_HEAP
documentation
*(posting the link to *
the configAPPLICATION_ALLOCATED_HEAP manual page
is verboten for a newcomer who just needs one specific question answered)
opens a Pandora’s box of subtle interfacing problems,
and when I follow any of the manuals of any one tool,
I’m playing whack-a-mole:
fixing a problem according to the documentation of one tool creates a new problem in the other tool.
I hope that sorting this out is not a Recreational Impossibility,
and I can get an answer by the actual designers of the FreeRTOS/MCUXpresso interface.
Thanks,
Christoph Maier