This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Dear TI support!
SDK mcu_plus_sdk_am243x_08_06_00_43
Board: AM243x-EVM
We're trying to get the posix thread example running based on the DUAL MAC example you sent to my colleague in the linked thread but we're struggling to get more than one additional thread running.
Here's what we did so far:
1. We ported the dual mac example from
from SDK 08_05 to the new SDK mcu_plus_sdk_am243x_08_06_00_43
That was successful, we could ping both interfaces!
2. We ran the posix pthread example:
mcu_plus_sdk_am243x_08_06_00_43\examples\kernel\freertos\posix_demo\am243x-evm\r5fss0-0_freertos
That was successful!
BUT: We weren't able to increase the number of worker threads to more than 6 even though it reads that the limit is 10. This might point to problem I'm getting to further down...
3. We compiled the posix_demo.c into the dual mac example "environment" (see 1.) and tried to call the posix_demo_main(NULL) in function freertos_main() instead of the enet_lwip_example(NULL), i.e. replacing the application completely.
That worked but just like described in 2. and we were not able to go above 6 worker threads.
4. Then we called the posix_demo_main() in function
print_cpu_load() in test_enet.c right after where the dual mac demo has completed its initialization and has printed its first usage.
So the idea was to create additional threads on top of the dual mac example as this is something we want to do in our own application.
Now the problem is that it will only create one additional worker thread with pthread_create() successfully and for the second worker thread we get an error (malloc won't work) and it crashes.
We're struggling to figure out if the problem lies in the number of threads or in the available memory.
We're new to the TI world and we're really stuck here.
What are we doing wrong?
We checked the Stack Usage view but couldn't "read and understand" the information properly.
In the plain dual mac example the udpecho_thread stack usage is displayed in yellow, what does that mean? Is it too big already? Is this a problem?
After it runs were trying to create more threads...
We tried to juggle around with memory in the linker.cmd, we increased memory, reduced it, shifted sections from MSRAM to DDR and back but that didn't change anything whatsoever.
What could the problem be? More memory allocation? More threads?
What do we need to do?
We reduced the optimization to -o2 in order to be able to debug properly. A higher level of optimization didn't change anything though.
Please let me know if you need any more information.
Thank you very much,
Ralf G
Hello everyone,
We were able to resolve the problem of not being able to create any additional threads.
This might help other newbies:
We increased the LENGTH of DDR in the linker.cmd file memory assignment.
There are 2GB of DDR RAM on the board so we decided to use all the memory for now:
Initial setting:
DDR : ORIGIN = 0x80000000 , LENGTH = 0x120000
New setting:
DDR : ORIGIN = 0x80000000 , LENGTH = 0x80000000
Best regards,
Ralf G