From b1b5516b42b11d340d038159e7c54dc87ed21a5f Mon Sep 17 00:00:00 2001 From: Stefan `Sec` Zehl Date: Fri, 5 Aug 2011 18:53:40 +0200 Subject: [PATCH] Move ramcode to clean address. Also sort exported symbols and add a few --- firmware/Makefile.inc | 2 +- firmware/filesystem/execute.c | 2 +- firmware/l0dable/EXPORTS | 151 ++++++++++++++++++--------------- firmware/lpc1xxx/linkscript.ld | 1 - 4 files changed, 85 insertions(+), 71 deletions(-) diff --git a/firmware/Makefile.inc b/firmware/Makefile.inc index 69097c0..2db9163 100644 --- a/firmware/Makefile.inc +++ b/firmware/Makefile.inc @@ -7,7 +7,7 @@ TARGET = LPC13xx FLASH = 32K SRAM = 8K -RAMCODE=2548 +RAMCODE=2560 # For USB HID support the LPC134x reserves 384 bytes from the sram, # if you don't want to use the USB features, just use 0 here. diff --git a/firmware/filesystem/execute.c b/firmware/filesystem/execute.c index 659d6b7..a4b861d 100644 --- a/firmware/filesystem/execute.c +++ b/firmware/filesystem/execute.c @@ -28,7 +28,7 @@ uint8_t execute_file (const char * fname){ dst=(void (*)(void)) (sram_top); lcdPrint("T:"); lcdPrintIntHex(dst); lcdNl(); */ - dst=(void (*)(void)) 0x1000160C; + dst=(void (*)(void)) (0x10002000 - RAMCODE); res=f_open(&file, fname, FA_OPEN_EXISTING|FA_READ); diff --git a/firmware/l0dable/EXPORTS b/firmware/l0dable/EXPORTS index 25931cc..b156bfd 100644 --- a/firmware/l0dable/EXPORTS +++ b/firmware/l0dable/EXPORTS @@ -1,24 +1,20 @@ +#lcd +DoChar DoInt DoIntX DoString -GetLight -GetUUID32 -GetVoltage IntToStr IntToStrX -_timectr -delayms -delayms_queue -getInputRaw -getInputWaitRelease -getSeconds -gpioGetValue -gpioSetValue -handleMenu -iapReadSerialNumber -isNight +Font_7x8 +font +getFontHeight +setExtFont +lcdBuffer lcdClear lcdDisplay +lcdFill +lcdGetPixel +lcdLoadImage lcdNl lcdPrint lcdPrintInt @@ -27,65 +23,84 @@ lcdPrintln lcdRefresh lcdSetPixel lcdShift +lcdShowAnim +#input +getInput +getInputRaw +getInputWait +getInputWaitRelease +getInputWaitTimeout +#crypto +xxtea_decode_words +xxtea_encode_words +ECIES_decryptkeygen +ECIES_encyptkeygen +bitstr_parse_export +#fs +f_close +f_get_rc_string +f_lseek +f_open +f_read +f_write +# funk +_nrfresets +nrf_check_reset +nrf_config_set +nrf_rcv_pkt_end +nrf_rcv_pkt_poll_dec +nrf_rcv_pkt_start +nrf_rcv_pkt_time_encr +nrf_read_reg +nrf_snd_pkt_crc_encr +#queue +delayms +delayms_queue +delayms_queue_plus +push_queue +the_queue +work_queue +#config +readFile +selectFile +writeFile +saveConfig +the_config +#gpio +gpioGetValue +gpioSetDir +gpioSetValue +sspReceive +sspSend +sspSendReceive +#mesh +meshGetMessage meshbuffer meshgen meshincctr -mygmtime -push_queue -the_config -the_queue -work_queue -selectFile -nrf_snd_pkt_crc_encr -nrf_rcv_pkt_time_encr -getInput -ECIES_encyptkeygen -f_open -f_read -strlen +meshnice +#external strcpy -xxtea_encode_words -getRandom -crc16 -f_write -f_close -ECIES_decryptkeygen -bitstr_parse_export -f_get_rc_string -xxtea_decode_words -systickGetTicks -lcdFill +strlen memcpy -DoChar -font -Font_Invadersnouse -Font_7x8 -lcdBuffer -meshGetMessage +memset +#stuff +GetLight +GetUUID32 +GetVoltage +isNight +_timectr +crc16 +getRandom +getSeconds +iapReadSerialNumber +input +handleMenu +menuflags +mygmtime +nickfont nickname +systickGetTicks uint32touint8p uint8ptouint32 -memset -nrf_config_set -nrf_read_reg -nrf_check_reset -sspSend -sspReceive -sspSendReceive -getInputWait -lcdGetPixel -nickfont -setExtFont -getFontHeight -menuflags -delayms_queue_plus -getInputWaitTimeout -readFile -writeFile -input -saveConfig -lcdShowAnim -lcdLoadImage -meshnice -_nrfresets -f_lseek +#Add stuff here diff --git a/firmware/lpc1xxx/linkscript.ld b/firmware/lpc1xxx/linkscript.ld index 047b008..b632d78 100644 --- a/firmware/lpc1xxx/linkscript.ld +++ b/firmware/lpc1xxx/linkscript.ld @@ -38,7 +38,6 @@ SECTIONS KEEP(*(.irq_vectors)) KEEP(*(table)) *(.text.boot_entry) - *(.text.main) . = 0x000002FC ; /* or 1FC for LPC2000 */ KEEP(*(crp)) *(.text*)