91
STTM STM32 and STR91XF / Re: STM32 uTaskerBoot Project
« Last post by TeeYi on December 14, 2021, 03:24:23 PM »Hi Mark,
Thanks for your clarification.
By using Segger J-Flash, I manage to combine the both file & program on the MCU. But it still not working.
After that by using IAR, I try to debug on the uTaskerBoot which I found two problem on (uTaskerBootLoader.c):
1) The firmware never run the " start_application(UTASKER_CODE_START) " when compile for STM32, so I add defined _SMT32 as
as below for the compiler.
#elif defined _STM32 || defined _HW_AVR32 || defined _RX6XX || defined _KINETIS || defined _LM3SXXXX || defined _LPC17XX || (defined _M5223X && (defined _GNU || defined _COMPILE_IAR)) // {14}{17}{19}{20}{21}
#if !defined _WINDOWS
start_application(UTASKER_CODE_START); // jump to the application
#endif
#endif
2) when the program run [ if (fnCheckNewCode(&file_header))], it will cause HardFault exception
static void irq_hard_fault(void)
{
}
I attached the print screen (IAR) for your reference.
When I change the routine as below,
static int fnCheckNewCode(UPLOAD_HEADER *file_header)
{
return 0;
}
After compile again & combine both file (uTaskserBM and uTaskerBoot), my board success boot up and running my program.
Please advice how to solve the problem for fnCheckNewCode(UPLOAD_HEADER *file_header) routine.
For your information, I am using SMT32F407ZET6 .
Thanks & best regards.
Tee
Thanks for your clarification.
By using Segger J-Flash, I manage to combine the both file & program on the MCU. But it still not working.
After that by using IAR, I try to debug on the uTaskerBoot which I found two problem on (uTaskerBootLoader.c):
1) The firmware never run the " start_application(UTASKER_CODE_START) " when compile for STM32, so I add defined _SMT32 as
as below for the compiler.
#elif defined _STM32 || defined _HW_AVR32 || defined _RX6XX || defined _KINETIS || defined _LM3SXXXX || defined _LPC17XX || (defined _M5223X && (defined _GNU || defined _COMPILE_IAR)) // {14}{17}{19}{20}{21}
#if !defined _WINDOWS
start_application(UTASKER_CODE_START); // jump to the application
#endif
#endif
2) when the program run [ if (fnCheckNewCode(&file_header))], it will cause HardFault exception
static void irq_hard_fault(void)
{
}
I attached the print screen (IAR) for your reference.
When I change the routine as below,
static int fnCheckNewCode(UPLOAD_HEADER *file_header)
{
return 0;
}
After compile again & combine both file (uTaskserBM and uTaskerBoot), my board success boot up and running my program.
Please advice how to solve the problem for fnCheckNewCode(UPLOAD_HEADER *file_header) routine.
For your information, I am using SMT32F407ZET6 .
Thanks & best regards.
Tee