2024-12-24 11:53 AM - edited 2024-12-24 11:55 AM
When I try to set up a HAL_UART_Receive_IT my program won't compile.
I am new to the FreeRTOS concept, but it is necessary for me to learn how to set it up for a project I am working on. For that, I started restructuring a previous project to learn from the process. I stumbled with the problem of me not knowing how to setup a UART interrupt when using tasks. I tried reading online on how to do it. This is what I have done so far:
I tested tasks by making a LED blink. But when I tried to set up a HAL_UART_Receive_IT my program wouldn't compile. My guess is that I have a bad case of I-am-a-rookie. But I tried this:
Normally the IDE does a great job at guiding me whenever there is a bug or outlines where I made a syntax mistake. Right now, it does nothing. It fails to compile. It works again when I erase the HAL_UART_Receive_IT(), though. Where should I call this function? What do I need to set up UART reception using FreeRTOS(CMSIS V2)? I know I have to pass the received message through a queue, but I have not being able to compile the code, yet.
P.S. I get a message saying I did not enabled the USE_NEWLIB_REENTRANT, is that important? I read the description but it doesn't sound like something I need at the moment.
Solved! Go to Solution.
2024-12-24 03:03 PM
Yes, FLASH is full. Assuming the size of FLASH is defined correctly in the linker file (*.ld), you'll have to reduce the size of your code somehow.
Setting the Build Configuration to Release instead of Debug can shave off a significant amount and increase speed at the expensive of some debugging functionality.
2024-12-24 12:08 PM - edited 2024-12-24 12:08 PM
> Right now, it does nothing. It fails to compile.
When you try to compile, and it fails to compile, error messages are output to the Console tab. Scroll up to the top and look at the first or first few error messages in the Console tab and you will get an error message the describes why it doesn't compile. (Do not look at the Problems tab.)
If you can't figure it out, show those error messages in full here.
2024-12-24 02:39 PM
/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: Project_RTOS_v2.0.elf section `.text' will not fit in region `FLASH'
/arm-none-eabi/12.3.1/../../../../arm-none-eabi/bin/ld.exe: region `FLASH' overflowed by 3076 bytes
make: *** [makefile:92: Project_RTOS_v2.0.elf] Error 1
14:26:24 Build Failed. 3 errors, 0 warnings. (took 1s.745ms)
I got these error. Is the flash memory full? I haven't even added any complex code to the program.
2024-12-24 03:03 PM
Yes, FLASH is full. Assuming the size of FLASH is defined correctly in the linker file (*.ld), you'll have to reduce the size of your code somehow.
Setting the Build Configuration to Release instead of Debug can shave off a significant amount and increase speed at the expensive of some debugging functionality.
2024-12-24 03:38 PM
It worked!
Thank you!