Hi,
I am trying to load a freeRTOS LED blinking program in to STM32F0 discovery board using IAR. The sample project is available with FreeRTOS. I was able to build the source code and it acts like it’s uploaded and a multicolour LED is blinking as the indication of communication. I wrote a sample LED bliking program using KEIL and the code is working file. After that again I uploaded the freeRTOS blinky example and still the old code is running. While download and Debug session, I was not able to see the tasks and Queues, which is supposed to be visible. Do I have to change any configuration files???
I’m not sure I understand the scenario you are describing, but I think you are saying:
You downloaded the IAR demo from the FreeRTOS release - which seemed to get programmed into the device but you didn’t say if it behaved as expected or not.
You then switched to using Keil and created your own program.
You went back to the IAR demo, but this time when you try running it you find the Keil program you were using is still running.
If that is the case then it sounds like you are not actually programming the device when you are using the IAR tools.
Open the project in IAR and go to the project’s options. In the options window select the Debugger category. In that category select the Setup tab and check that the Driver is set to the correct interface (STLink, J-Link, or whatever) and not to Simulator. Next in the same category select the Download tab and ensure Use Flash Loader is selected - if it is not selected then it won’t program the flash.
You downloaded the IAR demo from the FreeRTOS release - which seemed to get programmed into the device but you didn’t say if it behaved as expected or not.
It’s in the debug session (don’t know how to change back to release)
Thank god the code is now uploaded after I select"Use Flash Loader" and then select overrise default.board file and then chode " flashloader\ST\FlashSTM32F051x8.board"
But the LED is not blinking. PC8 (LD4) and PC9 (LD3) are the two LED’s connected. In the program, LED1 is selected. But in the board LED1 is different. So I tried LED1,2,3,4. But still I am not getting the result.
It seems the program is running ok - if the LED is not toggling then either the port setting is not correct or the wrong pin is being toggled - and the StateViewer plug-in is showing the correct information.
Screenshot1.jpg shows the StateViewer probing the symbol table to see which features are built into the kernel (how FreeRTOSConfig.h is set) - if it can’t find a particular feature it does not look again.
It seems the program is running ok - if the LED is not toggling then either the port setting is not correct or the wrong pin is being toggled - and the StateViewer plug-in is showing the correct information.
This info corrected my doubt and now the code is working
in the stm320518_eval.h file I made the following change and now it’s working. If we use the standard STM32F051R8T board, the correct configuration is show below. Wrong port was selected.
#define LED1_PIN GPIO_Pin_8 // previously it was GPIO_Pin_10
#define LED1_GPIO_PORT GPIOC
#define LED1_GPIO_CLK RCC_AHBPeriph_GPIOC
#define LED2_PIN GPIO_Pin_9 //previously it was GPIO_Pin_11
#define LED2_GPIO_PORT GPIOC
#define LED2_GPIO_CLK RCC_AHBPeriph_GPIOC