STM32CubeMX generated build for IAR does not work
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-10-22 4:30 AM - last edited on ‎2023-07-12 10:12 AM by Kevin HUBER
Hi
When generating for CubeIDE firmware executes fine in both production and engineering mode.
But for IAR/EWARM only engineering mode works. And, yes, I am aware of production mode not supported out of the box. Manual copy to target and start required.
Target STM32MP1-DK2
STMCubeMX 6.3.0
STMCubeIDE 1.7.0
EWARM 9.10.1
/* USER CODE BEGIN WHILE */
while (1)
{
static int loopCounter;
loopCounter++;
HAL_GPIO_WritePin(LED_Y_GPIO_Port, LED_Y_Pin, GPIO_PIN_SET);
if( loopCounter < 10 )
{
for(volatile int i = 0; i < 5000000; i++);
}
else
{
HAL_Delay(500);
}
HAL_GPIO_WritePin(LED_Y_GPIO_Port, LED_Y_Pin, GPIO_PIN_RESET);
if( loopCounter < 10 )
{
for(volatile int i = 0; i < 5000000; i++);
}
else
{
HAL_Delay(500);
}
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
}
/* USER CODE END 3 */
Reproduction method
Generate STMCubeIDE and EWARM projects by changing in MX Project Manager from attached HAL_Tick_TIM6.ioc.
Add code snippet to main.c
- Run STMCubeIDE generated project in production mode in IDE. Check expected result
- Build EWARM and copy/rename to /usr/local/project/HAL_Tick_TIM6_CM4/lib/firmware/HAL_Tick_TIM6_CM4.elf. Start with /usr/local/project/HAL_Tick_TIM6_CM4/fw_cortex_m4.sh stop and then start. Check error result.
- Run elf-file from STMCubeIDE (step 1) again. Check error result.
Expected result
Continous blinking of amber LED.
Error result
9 blinks of amber LED and then a halt.
Observed cause for error, not knowing root cause
NVIC TIM6 IRQ is of some reason disabled. Hard to debug from IAR environment...
/Peter
Solved! Go to Solution.
- Labels:
-
IAR
-
STM32MP15 Lines
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-10-26 3:01 AM
Hi @PeterL​ ,
Did you perform a board reset between step 1/2/3 ?
Else, issue around NVIC TIM IRQ remind me this post :
Could it be occurrence of the same problem ?
Olivier
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-10-26 3:01 AM
Hi @PeterL​ ,
Did you perform a board reset between step 1/2/3 ?
Else, issue around NVIC TIM IRQ remind me this post :
Could it be occurrence of the same problem ?
Olivier
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-10-26 6:14 AM
Hi @Community member​
It is the same problem as the post you referred to. Maybe a good Idea to adress it in CubeMX? /Peter
