Manually, I downloaded rbf file into the dev board. then I used RAppID BL to program an application code. The RAppID erased the flash and downloaded the application code successfully as shown in the figure below. However, the application code doesn't work.
Are there any steps missing to download an application code successfully ????
Hello @abdelrhman ,
Please ensure you have setup your application properly so that the RCHW value, address of KEY, etc are set at proper addresses and values, etc.
Device |
Communication supported |
Device tested |
RBF file |
Boot-loader areas |
||
CAN (500Kb/s) |
UART (115200b/s) |
rchw |
m_text |
|||
MPC5744P |
CAN0 (PB0-PB1) |
UART2 (PF14-PF15) |
MPC5744P-FML09 1N15P MPC5744P-FMLQ8 0N65H PPG5744P-FMMM8 0N65H |
MPC5744P.rbf |
0x00F98000 - 0x00F98004 |
0x00F98008 - 0x00F9FFFF |
Please refer to section 5.2 for defining the value of RCHW and KEY
Please refer to section 6.2 for setting up the application project with S32DS tool
The MPC574xP RBF boot-loader occupies 16K memory blocks starting at 0x00F98000. Please note that the address of the final position in “.srec” file will depend on the device memory map
The user application is allowed on RAM from the base address + 0x1400 to the end of RAM
Before starting the application, the boot-loader will search for RCHW and KEY value in the application. If found, the boot-loader will consider the application suitable and run it. Otherwise, the boot-loader will not run the application and stay in waiting mode.
The only value for RCHW is 0x005A0000
The only value for KEY is 0x55AA55AA
Figure 6.2.1
#if defined(START_FROM_FLASH)
#include "typedefs.h"
#define MPC57xx_ID 0x005A0000 /* RCHW boot ID for MPC57xx devices */
#define VLE_ENABLE 0x01000000 /* VLE is enabled */
#define CPU2_ENABLED 0x00000001
#define CPU0_ENABLED 0x00000002
#define CPU1_ENABLED 0x00000008
extern void _start(void);
extern void _startcore1(void);
extern void _startcore2(void);
#define TARGET_CORES (CPU0_ENABLED | CPU1_ENABLED | CPU2_ENABLED)
//#define RCHW_VAL (MPC57xx_ID | TARGET_CORES)
#define RCHW_VAL 0x005A0000
const volatile uint32_t APPKEY __attribute__ ((section(".appkey"))) = 0x55AA55AA;
const uint32_t __attribute__ ((section(".rchw"))) RCHW [] = {
RCHW_VAL,
/* cpu0_reset_vector */ (uint32_t)_start,
/* delay */ 0x2DC6C0, // 3 sec
/* application key */ (uint32_t)&APPKEY,
/* cpu2_reset_vector */ (uint32_t)_startcore2,
/* cpu1_reset_vector */ (uint32_t)_startcore1};
#endif /* defined(START_FROM_FLASH) */
Figure 6.2.2
Figure 6.2.3
Figure 6.2.4
Hope it helps,
Mike