cancel
Showing results for 
Search instead for 
Did you mean: 

Firmware Behaviour change after files clean up

ISust.1
Associate

I am working on a state machine to control a stm32f334 mcu, first state would be general initialization, the wifi initialization, waiting for stable input and some other states that are not relevant here.

It was working smoothly and I wanted to commit my latest changes, when I went to commit I realized there where so many random changes that were made by the IDE and not by me, so I decided to do a clean up and only commit what I had changed. After this the behavior of the firmware changed, now it won't get past the wifi stage or the wait for stable input stage. On each run it will get stuck in one of them randomly, it will try to perform the actions required there and later it will move to tasks.c where it will get stuck forever.

It seems to be that I have deleted some changes made by the IDE that are required for my MCU, so I was wondering if anybody knows a way to force the IDE to recreate all that support files somehow?

Thanks in advance.

UPDATE: It looks like the function where most often enters in tasks.c is "prvCheckTaskWaitingTermination". Also instead of following the declared order of the state machine states, it goes trough the first 3 in order and then jumps back to the beginning, prior to the state machine, and the process repeats again.

UPDATE 2: It think that the compiler is playing with me, it is doing weird things with the state values and most of the time I will not be able to read the value of them in the debugger. Currently the definition of the compiler is in -o2, reduce space

UPDATE 3: Turns out that there is some sort of linking error. The project I am working on branched out from another one, it seems that after the process described above, now the files that the IDE is running are coming from this other project. However, I deleted that project so conflicts would arise and nothing happened, it's still running and seems like it makes reference to that very same project. In fact I commented a lane that contained a timer, and the timer is still running. Weird, weird, weird. Go into software they said...

UPDATE 4: It seems like the problem is also related to the timer I was talking about, I copy pasted the project to a different directory, commented out the timer line and now the program doesn't get stuck in that bit. However next stage has a timer too, and again gets lost in there. The timer is constructed on top of "TickType_t xTaskGetTickCounts()

0 REPLIES 0