This commit is contained in:
moyuhai
2026-06-09 16:39:17 +08:00
commit 41a602f89c
3057 changed files with 771495 additions and 0 deletions
@@ -0,0 +1,12 @@
FUNC void Initialization(void)
{
SP = _RDWORD(0x10000000);
PC = _RDWORD(0x10000004);
}
LOAD %L INCREMENTAL
Initialization();
@@ -0,0 +1,84 @@
FUNC void InitGpio(void)
{
// Config IOMUX
/*
gpio_mux_ctl_u(33,1);//d2
gpio_mux_ctl_u(34,1);//d3
gpio_mux_ctl_u(35,2);//clk
gpio_mux_ctl_u(36,2);//cs
gpio_mux_ctl_u(37,2);//d0 rx
gpio_mux_ctl_u(38,2);//d1 tx
*/
_WDWORD(0x4000019c, 0x00002A94);
}
FUNC void InitFlash(void)
{
}
FUNC void InitXIP(void)
{
_WDWORD(0x40000104,0x040000);//reset ssi0
_WDWORD(0x40000104,0x040004);//reset ssi0
_WDWORD(0x40000050,0x110000);//close spi0 mclk
_WDWORD(0x40000070,0x1000000);//close spi0 pclk
//config fmc
_WDWORD(0x40000270, 0x0503);
_Sleep_(1);// delay about 400us
_WDWORD(0x40000270, 0x3503);
//config cache
_Sleep_(1);// delay about 400us
_WDWORD(0x52000000, 0x0);
_Sleep_(1);// delay about 400us
_WDWORD(0x52000000, 0x21);
_Sleep_(1);// delay about 400us
_Sleep_(1);// delay about 400us
_Sleep_(1);// delay about 400us
_Sleep_(1);// delay about 400us
//config xip spi
_WDWORD(0x51000008, 0); //disable spi
_WDWORD(0x5100002c,0); //close IE
_WDWORD(0x51000000,0x1F); //32bit SPI data
_WDWORD(0x51000010,0x01); //enable select slave -- SE
_WDWORD(0x51000018,0x0); //TXFTL be set 0
_WDWORD(0x5100001c,0x0); //RXFTL be set 0
_WDWORD(0x5100010c, 0x01);//enable select slave
_WDWORD(0x51000114, 0xFF);//XIP time out
_WDWORD(0x51000014, 0x2);//div 2
//quad
_WDWORD(0x51000108, (2)|(6<<4)|(2<<9)|(1<<22)|(1<<29)|(1<<23)|(0<<24)|(8<<13));
_WDWORD(0x51000100, 0x6b);//quad read cmd
_WDWORD(0x51000104, 0x6b);//quad read cmd
// //dual
// _WDWORD(0x51000108, (1)|(6<<4)|(2<<9)|(1<<22)|(1<<29)|(1<<23)|(0)|(8<<13));
// _WDWORD(0x51000100, 0x3b);//dual read cmd
// _WDWORD(0x51000104, 0x3b);//dual read cmd
_WDWORD(0x51000008, 1); //enable spi
}
FUNC void Initialization(void)
{
InitGpio();
InitFlash();
InitXIP();
SP = _RDWORD(0x11001000);
PC = _RDWORD(0x11001004);
_WDWORD(0x4000013C, 0x11001001);
}
LOAD %L INCREMENTAL
Initialization();
@@ -0,0 +1,131 @@
;;;
;;;
;;LOAD 0x10000000
;;{
;;EXE 0x10000000
;;{
;;startup_xinc.o (RESET, +FIRST)
;;* (+RO)
;;}
;;; L2CAP_CODE +0
;;; {
;;; * (l2cap_code)
;;; }
;;; GATT_CODE +0
;;; {
;;; * (gatt_code)
;;; }
;;; GAP_CODE +0
;;; {
;;; * (gap_code)
;;; }
;;; LLC_CODE +0
;;; {
;;; * (llc_code)
;;; }
;;; LLD_CODE +0
;;; {
;;; * (lld_code)
;;; }
;;;
;;; LLM_CODE +0
;;; {
;;; * (llm_code)
;;; }
;;; ECC_CODE +0
;;; {
;;; * (ecc_code)
;;; }
;;RW +0000
;;{
;;* (+RW,+ZI)
;;}
;;; KE_CODE +0
;;; {
;;; *(ke_code)
;;;
;;; }
;;; AES_CODE +0
;;; {
;;; * (aes_code)
;;; }
;;; CO_CODE +0
;;; {
;;; * (co_code)
;;; }
;;;
;;; NVDS_CODE +0
;;; {
;;; * (nvds_code)
;;; }
;;;
;;; SCH_CODE +0
;;; {
;;; * (sch_code)
;;; }
;;; LL_CO_CODE +0
;;; {
;;; * (ll_co_code)
;;; }
;;ScatterAssert(ImageLength(RW) < 1024 * 28)
;;;
;;;
;;; ScatterAssert(ImageLength(KE_CODE) < 100)
;;; ScatterAssert(ImageLength(ECC_CODE) < 0x100)
;;; ScatterAssert(ImageLength(AES_CODE) < 0x10)
;;; ScatterAssert(ImageLength(CO_CODE) < 0x100)
;;; ScatterAssert(ImageLength(NVDS_CODE) < 0x100)
;;; ScatterAssert(ImageLength(GAP_CODE) < 0x100)
;;; ScatterAssert(ImageLength(GATT_CODE) < 0x100)
;;; ScatterAssert(ImageLength(L2CAP_CODE) < 0x100)
;;; ScatterAssert(ImageLength(SCH_CODE) < 0x100)
;;; ScatterAssert(ImageLength(LL_CO_CODE) < 0x100)
;;; ScatterAssert(ImageLength(LLC_CODE) < 0x110)
;;; ScatterAssert(ImageLength(LLD_CODE) < 0x1210)
;;; ScatterAssert(ImageLength(LLM_CODE) < 0x910)
;;; ScatterAssert(ImageLength(EXE)+ ImageLength(RW) + ImageLength(KE_CODE) + ImageLength(ECC_CODE) + ImageLength(AES_CODE)
;;; + ImageLength(CO_CODE)+ ImageLength(NVDS_CODE)+ ImageLength(GAP_CODE)+ ImageLength(GATT_CODE)
;;; + ImageLength(L2CAP_CODE)+ ImageLength(SCH_CODE)+ ImageLength(LL_CO_CODE)+ ImageLength(LLC_CODE)
;;; + ImageLength(LLD_CODE)+ ImageLength(LLM_CODE)< 96*1024)
;;}
LOAD 0x10000000
{
EXE 0x10000000
{
startup_xinc.o (RESET, +FIRST)
* (+RO)
}
RW +0000
{
* (+RW,+ZI)
}
ScatterAssert(ImageLength(RW) < 1024 * 28)
}
;LOAD 0x11001000
;{
;EXE 0x11001000
;{
;startup_xinc.o (RESET, +FIRST)
;* (+RO)
;}
;RW 0x10002000
;{
;* (+RW,+ZI)
;*(ram_code)
;}
;}
@@ -0,0 +1,131 @@
;;;
;;;
;;LOAD 0x10000000
;;{
;;EXE 0x10000000
;;{
;;startup_xinc.o (RESET, +FIRST)
;;* (+RO)
;;}
;;; L2CAP_CODE +0
;;; {
;;; * (l2cap_code)
;;; }
;;; GATT_CODE +0
;;; {
;;; * (gatt_code)
;;; }
;;; GAP_CODE +0
;;; {
;;; * (gap_code)
;;; }
;;; LLC_CODE +0
;;; {
;;; * (llc_code)
;;; }
;;; LLD_CODE +0
;;; {
;;; * (lld_code)
;;; }
;;;
;;; LLM_CODE +0
;;; {
;;; * (llm_code)
;;; }
;;; ECC_CODE +0
;;; {
;;; * (ecc_code)
;;; }
;;RW +0000
;;{
;;* (+RW,+ZI)
;;}
;;; KE_CODE +0
;;; {
;;; *(ke_code)
;;;
;;; }
;;; AES_CODE +0
;;; {
;;; * (aes_code)
;;; }
;;; CO_CODE +0
;;; {
;;; * (co_code)
;;; }
;;;
;;; NVDS_CODE +0
;;; {
;;; * (nvds_code)
;;; }
;;;
;;; SCH_CODE +0
;;; {
;;; * (sch_code)
;;; }
;;; LL_CO_CODE +0
;;; {
;;; * (ll_co_code)
;;; }
;;ScatterAssert(ImageLength(RW) < 1024 * 28)
;;;
;;;
;;; ScatterAssert(ImageLength(KE_CODE) < 100)
;;; ScatterAssert(ImageLength(ECC_CODE) < 0x100)
;;; ScatterAssert(ImageLength(AES_CODE) < 0x10)
;;; ScatterAssert(ImageLength(CO_CODE) < 0x100)
;;; ScatterAssert(ImageLength(NVDS_CODE) < 0x100)
;;; ScatterAssert(ImageLength(GAP_CODE) < 0x100)
;;; ScatterAssert(ImageLength(GATT_CODE) < 0x100)
;;; ScatterAssert(ImageLength(L2CAP_CODE) < 0x100)
;;; ScatterAssert(ImageLength(SCH_CODE) < 0x100)
;;; ScatterAssert(ImageLength(LL_CO_CODE) < 0x100)
;;; ScatterAssert(ImageLength(LLC_CODE) < 0x110)
;;; ScatterAssert(ImageLength(LLD_CODE) < 0x1210)
;;; ScatterAssert(ImageLength(LLM_CODE) < 0x910)
;;; ScatterAssert(ImageLength(EXE)+ ImageLength(RW) + ImageLength(KE_CODE) + ImageLength(ECC_CODE) + ImageLength(AES_CODE)
;;; + ImageLength(CO_CODE)+ ImageLength(NVDS_CODE)+ ImageLength(GAP_CODE)+ ImageLength(GATT_CODE)
;;; + ImageLength(L2CAP_CODE)+ ImageLength(SCH_CODE)+ ImageLength(LL_CO_CODE)+ ImageLength(LLC_CODE)
;;; + ImageLength(LLD_CODE)+ ImageLength(LLM_CODE)< 96*1024)
;;}
;LOAD 0x10000000
;{
;EXE 0x10000000
;{
;startup_xinc.o (RESET, +FIRST)
;* (+RO)
;}
;RW +0000
;{
;* (+RW,+ZI)
;}
;ScatterAssert(ImageLength(RW) < 1024 * 28)
;}
LOAD 0x11001000
{
EXE 0x11001000
{
startup_xinc.o (RESET, +FIRST)
* (+RO)
}
RW 0x10002000
{
* (+RW,+ZI)
*(ram_code)
}
}