mirror of
https://github.com/hathach/tinyusb.git
synced 2025-03-29 10:20:57 +00:00
added IAR flash loader for NGX4330 or lpc18/43xx
This commit is contained in:
parent
31a10c9780
commit
6404b06341
9
mcu/lpc43xx/iar/FlashLPC18xx_43xx_SPIFI.board
Normal file
9
mcu/lpc43xx/iar/FlashLPC18xx_43xx_SPIFI.board
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
|
||||
<flash_board>
|
||||
<pass>
|
||||
<loader>C:\Users\hathach\Dropbox\tinyusb\workspace\tinyusb\mcu\lpc43xx\iar\FlashLPC18xx_43xx_SPIFI.flash</loader>
|
||||
</pass>
|
||||
</flash_board>
|
||||
|
||||
|
10
mcu/lpc43xx/iar/FlashLPC18xx_43xx_SPIFI.flash
Normal file
10
mcu/lpc43xx/iar/FlashLPC18xx_43xx_SPIFI.flash
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
|
||||
<flash_device>
|
||||
<exe>C:\Users\hathach\Dropbox\tinyusb\workspace\tinyusb\mcu\lpc43xx\iar\FlashLPC18xx_43xx_SPIFI.out</exe>
|
||||
<page>256</page>
|
||||
<block>1 0x4000000</block>
|
||||
<flash_base>0x14000000</flash_base>
|
||||
<macro>C:\Users\hathach\Dropbox\tinyusb\workspace\tinyusb\mcu\lpc43xx\iar\FlashLPC18xx_43xx_SPIFI.mac</macro>
|
||||
<aggregate>1</aggregate>
|
||||
</flash_device>
|
31
mcu/lpc43xx/iar/FlashLPC18xx_43xx_SPIFI.mac
Normal file
31
mcu/lpc43xx/iar/FlashLPC18xx_43xx_SPIFI.mac
Normal file
@ -0,0 +1,31 @@
|
||||
__Setup()
|
||||
{
|
||||
/* set SPIFI clock */
|
||||
//LPC_CGU->BASE_SPIFI0_CLK = 1<<24 | 1<<11; /* IRC 12 MHz is good enough for us */
|
||||
__writeMemory32( 1<<24 | 1<<11, 0x40051304, "Memory");
|
||||
|
||||
//LPC_SCU->SFSP3_3 = 0xF3; /* high drive for SCLK */
|
||||
__writeMemory32( 0xF3, 0x4008618C, "Memory");
|
||||
|
||||
/* IO pins */
|
||||
//LPC_SCU->SFSP3_4=LPC_SCU->SFSP3_5=LPC_SCU->SFSP3_6=LPC_SCU->SFSP3_7 = 0xD3;
|
||||
__writeMemory32( 0xD3, 0x40086190, "Memory");
|
||||
__writeMemory32( 0xD3, 0x40086194, "Memory");
|
||||
__writeMemory32( 0xD3, 0x40086198, "Memory");
|
||||
__writeMemory32( 0xD3, 0x4008619C, "Memory");
|
||||
//LPC_SCU->SFSP3_8 = 0x13; /* CS doesn't need feedback */
|
||||
__writeMemory32( 0x13, 0x400861A0, "Memory");
|
||||
|
||||
__writeMemory32(0x14000000, 0x40043100, "Memory"); // map SPIFI to shadow area at address 0
|
||||
}
|
||||
|
||||
execUserReset()
|
||||
{
|
||||
__message "----- execUserReset\n";
|
||||
__Setup();
|
||||
}
|
||||
|
||||
execUserFlashInit(){
|
||||
__message "----- execUserFlashInit\n";
|
||||
__Setup();
|
||||
}
|
BIN
mcu/lpc43xx/iar/FlashLPC18xx_43xx_SPIFI.out
Normal file
BIN
mcu/lpc43xx/iar/FlashLPC18xx_43xx_SPIFI.out
Normal file
Binary file not shown.
18
mcu/lpc43xx/iar/lpc18xx_43xx_debug.mac
Normal file
18
mcu/lpc43xx/iar/lpc18xx_43xx_debug.mac
Normal file
@ -0,0 +1,18 @@
|
||||
__Setup(){
|
||||
__writeMemory32((int)&__vector_table, 0x40043100, "Memory"); // map BootArea to shadow area at address 0
|
||||
__writeMemory32((int)&__vector_table, 0xE000ED08, "Memory"); // map BootArea to shadow area at address 0
|
||||
__message "Memory at: ", &__vector_table, " mapped to 0x00000000\n";
|
||||
}
|
||||
|
||||
execUserReset()
|
||||
{
|
||||
__message "execUserReset\n";
|
||||
__Setup();
|
||||
__message "execUserReset Finish\n";
|
||||
}
|
||||
|
||||
execUserFlashInit(){
|
||||
__message "execUserFlashInit\n";
|
||||
__Setup();
|
||||
__message "execUserFlashInit Finish\n";
|
||||
}
|
@ -55,6 +55,6 @@ place in PD_LOCAL_SRAM_region { section .pd_local_sram };
|
||||
place in AHB_SRAM2_region { section .ahb_sram2 };
|
||||
place in ETB_SRAM_region { section .etb_sram };
|
||||
|
||||
place in RAM_region { readonly };
|
||||
place in AHB_SRAM1_region { readwrite,
|
||||
block CSTACK, block HEAP };
|
||||
place in ROM_region { readonly };
|
||||
place in RAM_region { readwrite,
|
||||
block CSTACK, block HEAP };
|
Loading…
x
Reference in New Issue
Block a user