S08PA16 Bootloader

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

S08PA16 Bootloader

2,405件の閲覧回数
0800200c9a66
Contributor I

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.

0 件の賞賛
返信
7 返答(返信)

2,214件の閲覧回数
yurifernandes
Contributor I

I am trying to deploy a bootloader with the mc9s08pt60 I have a few examples only I can not configure the application to boot alquem could help me with some example?

0 件の賞賛
返信

2,215件の閲覧回数
vicentegomez
NXP TechSupport
NXP TechSupport

Hi

I do not recommend you use processor expert to create a boot loader, did the sample that I sent you does not help you?

Regards

0 件の賞賛
返信

2,215件の閲覧回数
0800200c9a66
Contributor I

I am continuing to make progress. I am able to load the boot loader and connect to the PC app Freescale - Universal Bootloader AN2295 $Version: 10.0.13.0$ 

Unfortunately It seems that the SDID 0x42 for the S08PA16 is not supported in the PC application?

Any assistance would be appreciated.

Here is the output from the PC bootloader app.

Waiting for HC(S)08/ColdFire/Kinetis reset ACK (timeout: 6s)...received 0xfc (good).


WARNING! The SDID of the device [0x042] is not (yet) supported!
Check AN2295SW for update!


Bootloader protocol version: 0x02 (S08, read command supported)
CRC protocol NOT supported)
Bootloader version string: S08P
System device ID: 0x042 [unknown derivative] rev. 0
Number of memory blocks: 2
Memory block #1: 0xC000-0xF3FF
Memory block #2: 0x3100-0x31FF
Erase block size: 512 bytes
Write block size: 128 bytes
Original vector table: 0xFFB0-0xFFFF
New vector table: 0xF3B0-0xF3FF

0 件の賞賛
返信

2,215件の閲覧回数
vicentegomez
NXP TechSupport
NXP TechSupport

I saw from your other thread that you already solved the problem

Please let me know if you have more questions

Have a good day.

0 件の賞賛
返信

2,215件の閲覧回数
0800200c9a66
Contributor I

Hi Vicente,

I have made some progress by modifying the example you sent. I am now able to load and debug the bootloader. However, I am getting stuck at the flash copy as shown in the screenshot. Line 93 just hangs forever. 

Any pointers would be appreciated.

pastedImage_2.png

0 件の賞賛
返信

2,215件の閲覧回数
0800200c9a66
Contributor I

I have an external crystal on this board. When trying to run the project without PE I get the following error:

=== CodeWarrior GDI protocol log ===
GDI DLL: C:\Freescale\CW MCU v11.1\MCU\bin\Plugins\Debugger\protocols\..\..\support\hc08\gdi\hcs08_pne_gdi.dll
CPU: MC9S08PA16

GDI: DiGdiOpen()
GDI: => DI_OK
GDI: DiGdiGetFeatures()
GDI: => DI_OK
GDI: Identification: HCS08 P&E to GDI wrapper, Version: 1.0.1, MeeAvailable: true, NrCpusAvailable: 1
GDI: DiGdiAddCallBack(cb_type = 0x4000)
GDI: => DI_OK
GDI: DiGdiInitIO()
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : , Entry : CWDBG_Simulator, Value : , R) => DI_OK
GDI: Mtwks Callback(MTWKS_CB_SETMEEID, 1) => DI_OK
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : GENERAL, Entry : CORBA_IDENTIFIER0, Value : , R) => DI_ERR_NONFATAL
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : GENERAL, Entry : CORBA_IDENTIFIER1, Value : , R) => DI_ERR_NONFATAL
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : PEDEBUG, Entry : DEPENDENCY_CHECK, Value : 0, R) => DI_ERR_NONFATAL
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : PEDEBUG, Entry : UUID, Value : DefaultProject, R) => DI_ERR_NONFATAL
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : CWDBG, Entry : Processor, Value : MC9S08PA16, R) => DI_OK
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : PEDEBUG, Entry : ERASE_PROGRAM_WITHOUT_ASKING, Value : 0, R) => DI_OK
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : PEDEBUG, Entry : AUTO_SYNC, Value : 1, R) => DI_OK
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : PEDEBUG, Entry : DOTRIM, Value : 1, R) => DI_OK
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : PEDEBUG, Entry : CURRENT_ALGORITHM_INDEX, Value : 0, R) => DI_OK
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : PEDEBUG, Entry : PRESERVE1_START, Value : 0, R) => DI_OK
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : PEDEBUG, Entry : PRESERVE1_END, Value : 63, R) => DI_OK
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : PEDEBUG, Entry : PRESERVE1_ACTIVE, Value : 0, R) => DI_OK
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : PEDEBUG, Entry : PRESERVE2_START, Value : 0, R) => DI_OK
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : PEDEBUG, Entry : PRESERVE2_END, Value : 63, R) => DI_OK
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : PEDEBUG, Entry : PRESERVE2_ACTIVE, Value : 0, R) => DI_OK
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : PEDEBUG, Entry : PRESERVE3_START, Value : 0, R) => DI_OK
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : PEDEBUG, Entry : PRESERVE3_END, Value : 63, R) => DI_OK
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : PEDEBUG, Entry : PRESERVE3_ACTIVE, Value : 0, R) => DI_OK
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : 9S08PA16, Entry : PRESERVE_EEPROM_START, Value : 0, R) => DI_ERR_NONFATAL
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : 9S08PA16, Entry : PRESERVE_EEPROM_END, Value : 0, R) => DI_ERR_NONFATAL
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : 9S08PA16, Entry : PRESERVE_EEPROM, Value : 0, R) => DI_ERR_NONFATAL
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : PEDEBUG, Entry : ALTERNATIVE_ALGORITHM_PATH, Value : , R) => DI_ERR_NONFATAL
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : PEDEBUG, Entry : ALTERNATIVE_ALGORITHM_CHECKBOX, Value : 0, R) => DI_OK
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : PEDEBUG, Entry : PARTITION_PARAM, Value : 0, R) => DI_ERR_NONFATAL
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : PEDEBUG, Entry : DO_PARTITIONING, Value : 0, R) => DI_ERR_NONFATAL
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : PEDEBUG, Entry : CUSTOM_TRIM, Value : 0, R) => DI_OK
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : 9S08PA16, Entry : TRIM_VALUE, Value : 0, R) => DI_ERR_NONFATAL
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : PEDEBUG, Entry : NGS_TRIM_OVERRIDE_REFERENCE_FREQUENCY, Value : 3276800, R) => DI_OK
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : PEDEBUG, Entry : ENABLE_FLASH_PROGRAMMING_DIALOG, Value : 0, R) => DI_OK
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : PEDEBUG, Entry : CURRENTCORE, Value : 1, R) => DI_ERR_NONFATAL
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : STARTUP, Entry : SPECIFY_NETWORKCARD_ENABLED, Value : 0, R) => DI_OK
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : STARTUP, Entry : IO_DELAY_CNT, Value : 0, R) => DI_ERR_NONFATAL
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : STARTUP12, Entry : show_hstep_assembly_details_new, Value : 0, R) => DI_ERR_NONFATAL
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : CWDBG, Entry : Connect, Value : 0, R) => DI_OK
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : STARTUP, Entry : eclipse_show_connection_assistant, Value : 1, R) => DI_ERR_NONFATAL
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : STARTUP, Entry : FREQ_FX, Value : 4, R) => DI_ERR_NONFATAL
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : STARTUP, Entry : FREQ_NORMAL, Value : 0, R) => DI_ERR_NONFATAL
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : STARTUP, Entry : FREQ_OSJTAG, Value : 0, R) => DI_ERR_NONFATAL
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : STARTUP, Entry : FREQ_CYCLONE, Value : 3, R) => DI_ERR_NONFATAL
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : STARTUP, Entry : FREQ_TRACELINK, Value : 3, R) => DI_ERR_NONFATAL
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : STARTUP, Entry : FREQ_LIGHTNING, Value : 1, R) => DI_ERR_NONFATAL
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : STARTUP, Entry : FREQ_OPENSDA, Value : 0, R) => DI_ERR_NONFATAL
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : STARTUP, Entry : RESET_DELAY, Value : 0, R) => DI_ERR_NONFATAL
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : STARTUP, Entry : PORT, Value : 21, R) => DI_OK
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : STARTUP, Entry : PORT_NAME_STRING, Value : PE5655235, R) => DI_OK
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : STARTUP, Entry : interface_selection, Value : 1, R) => DI_OK
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : STARTUP, Entry : IO_DELAY_SET, Value : 0, R) => DI_ERR_NONFATAL
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : STARTUP, Entry : USE_CYCLONEPRO_RELAYS, Value : 1, R) => DI_OK
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : STARTUP, Entry : CyclonePro_poweroffonexit, Value : 1, R) => DI_OK
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : STARTUP, Entry : CyclonePro_currentvoltage, Value : 255, R) => DI_OK
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : STARTUP, Entry : CyclonePro_PowerDownDelay, Value : 250, R) => DI_OK
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : STARTUP, Entry : CyclonePro_PowerUpDelay, Value : 250, R) => DI_OK
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : STARTUP, Entry : Multilink_PowerUpDelay, Value : 1000, R) => DI_OK
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : STARTUP, Entry : Multilink_PowerDownDelay, Value : 250, R) => DI_OK
GDI: Mtwks Callback(MTWKS_CB_PROJECTACCESS, Section : STARTUP, Entry : CPUTARGETTYPENAME, Value : , R) => DI_ERR_NONFATAL
INF: P&E Interface detected - Flash Version 6.15
INF: Frequency change to ~0hz.
INF: Frequency change to ~0hz.
INF: Frequency change to ~0hz.
INF: Frequency change to ~0hz.
INF: Frequency change to ~0hz.
ERR: Can not enter background mode .
INF: Frequency change to ~0hz.
INF: Frequency change to ~0hz.
INF: Frequency change to ~0hz.
INF: Frequency change to ~0hz.
INF: Frequency change to ~0hz.
INF: Frequency change to ~0hz.
INF: Unable to initialize PEDebug.
GDI: => DI_ERR_NONFATAL
GDI: The Debugger can not connect to the P&E device
GDI: DiGdiClose()
GDI: => DI_OK

0 件の賞賛
返信

2,216件の閲覧回数
0800200c9a66
Contributor I

OK. I can try to use the example you sent without PE, but I wasn't sure what changes need to be made to use with the S08PA16.

Thanks for your help.

0 件の賞賛
返信