Hello Guys,
I use the micro pn7362, but I'm not practical with NXP, my software requires a bootloader, I did not find an example that could help me. Can anyone tell me the best way to write a uart-bootloader? If sameone has documentation or examples, I'll be grateful.
Regards,
Ivo
What you mean the uart-bootloader? what is the purpose of it?
In my system a gateway is connect via serial with my PN7362, the upgrade
will be via serial. Boot software is waiting on the serial, and the .hex
will be transmitted via serial. At the end of the transmission the
gateway send a start command and the softwarewill jump to the new
address. I started my project from the example DoorAccess, the tag
reader works, the problem is the bootloader. The first step is to jump
to the new address, at the moment my bootloader firmware uses the
following commands:
/int main(void)//
//{//
// phFlashBoot_Main();//
// /** Create & initialize system task *///
// phExDoorAccess_SystemTaskInit();//
// /** Check the Boot reason and post the message to system task OR
perform the corresponding boot operation. *///
// phExDoorAccess_BootHandler();//
// /** Start the tasks and timer running. *///
// LED_RED_SetVal();//
//
// __DISABLE_IRQ();/*/
/*/ // Create pointer to new program address/*/
/*/ void (code_ptr)(void) = (void ()(void))0x20f004;/*/
/*/ // Call firmware at address 0x2000 (from pointer above)/*/
/*/ code_ptr();//
//}//
//
/In the application firmware I have changed the file
/PN7462AU_ex_phExDoorAccess_ReleasePN7462AU_memory.ld /in this way/:
/*
GENERATED FILE - DO NOT EDIT
(c) Code Red Technologies Ltd, 2008-2013
(c) NXP Semiconductors 2013-2017
Generated linker script file for PN7362AU-C3-00
Created from memory.ldt by FMCreateLinkMemory
Using Freemarker v2.3.23
LPCXpresso v8.2.2 on 10-lug-2017 12.25.51
*/
MEMORY
{
/* Define each memory region */
Flash (rx) : ORIGIN = 0x20f000, LENGTH = 1B800////* 158K bytes -
49152 Bytes */ /
SRAM (rwx) : ORIGIN = 0x100020, LENGTH = 0x2ee0 /* 12000 bytes (alias
RAM) */
EEPROM (rx) : ORIGIN = 0x201200, LENGTH = 0xe00 /* 3584 bytes (alias
Flash2) */
}
/* Define a symbol for the top of each memory region */
__base_Flash = 0x20f000 ; /* Flash */
__base_Flash = 0x20f000 ; /* Flash */
__top_Flash = 0x20f000 + 1B800 ; /* 158K bytes - 49152 Bytes */
__top_Flash = 0x20f000 + 1B800 ; /* 158K bytes///- 49152 Bytes */ /
__base_SRAM = 0x100020 ; /* SRAM */
__base_RAM = 0x100020 ; /* RAM */
__top_SRAM = 0x100020 + 0x2ee0 ; /* 12000 bytes */
__top_RAM = 0x100020 + 0x2ee0 ; /* 12000 bytes */
__base_EEPROM = 0x201200 ; /* EEPROM */
__base_Flash2 = 0x201200 ; /* Flash2 */
__top_EEPROM = 0x201200 + 0xe00 ; /* 3584 bytes */
__top_Flash2 = 0x201200 + 0xe00 ; /* 3584 bytes */
/
The .hex of the Application firmware start at the address 0x20F000.
With the program "Hex Workshop Hex Editor" I created the .hex boot +
application, I converted it to .bin, I programmed the micro, but the
jump didn't work.
Thanks in advance, I hope I have been clear.
Ivo
Il 11/07/2017 12:13, jimmychan ha scritto:
What you mean the uart-bootloader? what is the purpose of it?