Recent Posts

Pages: 1 ... 8 9 [10]
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
     
   
92
STTM STM32 and STR91XF / Re: STM32 uTaskerBoot Project
« Last post by mark on December 12, 2021, 11:03:16 PM »
Hi

When this command is executed there is the message "Boot code too long (> 1000). Terminating" and so no output content is generated.
The problem is that the "uTaskerBoot.bin" is 50k in size and the command tried to add the second file "uTaskerBM.bin" at the location 0x1000, which is not possible since this would be in the middle of the first file.

The basic issue is that the boot loader is being built with a linker script that locates the reset vector at the 0x08000000 but he reset of the code at 0x080c000 and so leaves a large gap between the two which makes the file large (this can be seen by opening the binary file in a hex editor and shows a large amount of 0x00 being inserted).

I believe the line in the linker script doing this is:

define symbol __ICFEDIT_region_CODE_start__ = 0x0800c000;

and is designed for use by programs that leave two flash sectors free for use by the parameter system. Since the boot loader doesn't use the parameter system this line is not appropriate and if you remove it it will presumably then generate loader code that is all in the first flash sector (and small).


The IAR out format is ELF format, which is not generated. You will therefore need to use a different loading technique than IAR's (which only allows loading files that it has created). ST Micro has a utility that is often used for this and, once the loader and the initial application are installed subsequent uploads can be performed by the application's loading method.

Regards

Mark

93
STTM STM32 and STR91XF / Re: STM32 uTaskerBoot Project
« Last post by TeeYi on December 10, 2021, 10:36:25 AM »
Hi Mark,
    I try to use uTaskerCombine tool to combine the uTaskerBoot.bin (from uTaskerBoot Project) with uTakserBM.bin (from uTaskerV1.4 Project) as below: (STM32)

   uTaskerCombine uTaskerboot.bin uTaskerBM.bin 0x1000 STM32.bin STM32.out 0x80000000

and 

   uTaskerCombine uTaskerboot.bin uTaskerBM.bin 0x1000 STM32.bin

but both command only generated STM32.bin file with 0 byte size.


    I attached both file for your reference & testing. Please advice how to generate the .out format file that required by IAR to program the firmware into the STM32 MCU.
    I am using Window 7 Professional (64bit) & uTaskerCombine V1.6 .

     Thanks.
     Tee
     
       
   
94
STTM STM32 and STR91XF / Re: STM32 uTaskerBoot Project
« Last post by TeeYi on November 30, 2021, 02:12:33 PM »
Hi Mark,
   Successful compile the project using IAR9.2.
   Thanks.
    Tee
95
STTM STM32 and STR91XF / Re: STM32 uTaskerBoot Project
« Last post by mark on November 29, 2021, 05:12:28 PM »
Hi

I have checked in an IAR9 project for STM32.

Regards

Mark
96
STTM STM32 and STR91XF / Re: STM32 uTaskerBoot Project
« Last post by TeeYi on November 29, 2021, 11:52:08 AM »
Hi Mark,
    Thanks for your reply. Could you please create the project for IAR which I'm using IAR for this STM32 uTaskerBoot.
    Thanks & best regards.
     Tee
97
NXPTM M522XX, KINETIS and i.MX RT / Re: CAN Interfaces on K24
« Last post by AlexS on November 29, 2021, 10:23:07 AM »
That was indeed the problem, found it when the app first started and noticed that my stack was being placed near the start of my DATA section. Thank you!
98
STTM STM32 and STR91XF / Re: STM32 uTaskerBoot Project
« Last post by mark on November 27, 2021, 03:34:56 AM »
Hi

I just checked in some changes that add "STM32 BM Loader target" to the VisualStudio project (VS2019) and also a GCC make file build that can be started from the VS project (when STM32 + GCC Build target is selected).

Both Kinetis and STM32 targets built successfully in the simulator and cross-compiled to their binary images.

There are only a few actual STM32 HW targets in config.h but it is relatively easy to add new ones if needed.

Regards

Mark
99
STTM STM32 and STR91XF / STM32 uTaskerBoot Project
« Last post by TeeYi on November 23, 2021, 03:03:05 PM »
Hello Mark,
   I download the STM32 package from its GIT repository (V1.4.11)  which in uTasker-Kinetic-master/Applications/uTaskerBoot/ only have the project file for for Kinetis, but don't have project file for SMT32. And in the uTaskerSerialBoot folder & uTaskerV1.4 folder have project file for both Kinetis & SMT32.
    Is this  uTaskerBoot support for STM32? If yes, where I can get the project file for this STM32 uTaskerBoot?
    Thanks.
    Tee 
100
NXPTM M522XX, KINETIS and i.MX RT / Re: CAN Interfaces on K24
« Last post by mark on November 23, 2021, 02:33:15 PM »
Hi Alex

The K24 with 256k Flash has no FlexCAN but the one that you use (with 1MBytes Flash) does.
Note the condition:

..(defined KINETIS_K24 && (SIZE_OF_FLASH == (1024 * 1024))).. which enables one FlexCAN interface.


// CAN configuration
//
#if defined KINETIS_KV50
    #define NUMBER_OF_CAN_INTERFACES 3
#elif defined KINETIS_KS
    #if defined KINETIS_K22
        #define NUMBER_OF_CAN_INTERFACES 2
    #else
        #define NUMBER_OF_CAN_INTERFACES 1
    #endif
#elif defined KINETIS_K64 || defined KINETIS_KW36 || (defined KINETIS_K24 && (SIZE_OF_FLASH == (1024 * 1024))) || defined KINETIS_KE06 || defined KINETIS_KEA64 || defined KINETIS_KEA128
    #define NUMBER_OF_CAN_INTERFACES 1
    #if defined KINETIS_KE06 || defined KINETIS_KEA64 || defined KINETIS_KEA128
        #define MSCAN_CAN_INTERFACE                                      // MSCAN rather than FlexCAN
    #endif
#elif (KINETIS_MAX_SPEED == 72000000) && (defined KINETIS_K20 || defined KINETIS_K30)
    #define NUMBER_OF_CAN_INTERFACES 1
#elif (KINETIS_MAX_SPEED == 120000000) && defined KINETIS_K22
    #define NUMBER_OF_CAN_INTERFACES 1
#elif defined KINETIS_K24
    #define NUMBER_OF_CAN_INTERFACES 0
#elif (KINETIS_MAX_SPEED >= 100000000) && (defined KINETIS_K10 || defined KINETIS_K20 || defined KINETIS_K26 || defined KINETIS_K30 || defined KINETIS_K40 || defined KINETIS_K60 || defined KINETIS_K65 || defined KINETIS_K66 || defined KINETIS_K70 || (defined KINETIS_KE14 && defined KINETIS_K_FPU) || defined KINETIS_KE16 || defined KINETIS_KE18)
    #define NUMBER_OF_CAN_INTERFACES 2
#else
    #define NUMBER_OF_CAN_INTERFACES 0
#endif



In fact the
#elif defined KINETIS_K24
    #define NUMBER_OF_CAN_INTERFACES 0

is probably redundant as the default is 0 FlexCANs anyway.

Therefore make sure that you have SIZE_OF_FLASH set appropriately.

Regards

Mark
Pages: 1 ... 8 9 [10]