AnsweredAssumed Answered

S08PA16 Bootloader

Question asked by 0800200c9a66 on Mar 26, 2019
Latest reply on Jun 17, 2019 by Yuri fernandes

I downloaded some bootloader example code here. I am trying to modify it to work with the S08PA16 uC. I am also using processor expert.

 

I am not able to get the bootloader firmware to run on the target processor. This is evidenced by a blinking LED test and also the PC Host software does not communicate with the uC.

 

In app.c I have:

<#if 1 /* if 1 app will not run */
/******************************************************************************
* Global variables
******************************************************************************/
uint8_t jmp_code @0x103D = 0xcc;
uint8_t jmp_addr[2] @0x103E = { 0, 0 };

/******************************************************************************
* Constants and macros
******************************************************************************/
//#define BOOT_PTD0_OPTION
//#define BOOT_IRQ_OPTION
#define USE_C_VECTOR

#if defined(USE_C_VECTOR)
#define INSTALL_VECTOR(n) interrupt n void vector_##n##_ISR(void) {__asm LDHX (RELOCATION_VERTOR_ADDR+(39-n)*2); __asm STHX jmp_addr; __asm PULH; __asm JMP jmp_code;}
#endif
#endif>

 

As the comment suggests, if the C code for vector remapping is in place, the app will not run.

 

Any suggestions would be appreciated.

Attachments

Outcomes