I have a feeling this is going to be an embarrassing post for me and my question has a really obvious answer.
I have the httpserv demo debugging just fine. I added a task to app_mqx and was still able to run it in the debugger. However, if I move this task to another source file (e.g. task.c), the code builds, but it doesn't run. When the code is working and I debug, I'll see the Segger window with the four progress bars appear while the code is downloading. After the function is moved to test.c, the window never pops up and therefore nothing executes.
I'm totally confused as to why this would happen. Can anyone shed some light on this for me? I'm pretty sure it's not a build problem, as the command line args to gcc look totally correct to me.
Thank you!
Solved! Go to Solution.
It turned out that the solution was to make all of the function definitions extern. I do not understand how the code could compile and link just fine without extern, yet not run. I have other MQX projects with tasks in different .c files, but they aren't marked extern either *and* they work.
It turned out that the solution was to make all of the function definitions extern. I do not understand how the code could compile and link just fine without extern, yet not run. I have other MQX projects with tasks in different .c files, but they aren't marked extern either *and* they work.
Hi,
Thanks for sharing your solution!
Regards
Sol
Can you provide an explanation as to why some projects need it, and some don't? It's very strange.