Fix executor for adjustable ram size
This commit is contained in:
parent
1bd05ca9cf
commit
2985d1b9f5
|
@ -7,7 +7,7 @@
|
|||
TARGET = LPC13xx
|
||||
FLASH = 32K
|
||||
SRAM = 8K
|
||||
RAMCODE=2K
|
||||
RAMCODE=2048
|
||||
|
||||
# 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.
|
||||
|
@ -40,6 +40,6 @@ CPU_TYPE = cortex-$(CORTEX_TYPE)
|
|||
# Compiler settings, parameters and flags
|
||||
##########################################################################
|
||||
|
||||
CFLAGS = -std=c99 -c -g -Os $(INCLUDE_PATHS) -Wall -mthumb -ffunction-sections -fdata-sections -fmessage-length=0 -mcpu=$(CPU_TYPE) -DTARGET=$(TARGET) -fno-builtin
|
||||
CFLAGS = -std=c99 -c -g -Os $(INCLUDE_PATHS) -Wall -mthumb -ffunction-sections -fdata-sections -fmessage-length=0 -mcpu=$(CPU_TYPE) -DTARGET=$(TARGET) -DRAMCODE=$(RAMCODE) -fno-builtin
|
||||
LDFLAGS = -nostartfiles
|
||||
|
||||
|
|
|
@ -7,10 +7,12 @@
|
|||
|
||||
void backlightInit(void);
|
||||
|
||||
extern void * __sram_top;
|
||||
|
||||
void execute (const void *function, uint16_t length){
|
||||
void (*dst)(void);
|
||||
|
||||
dst=(void (*)(void)) 0x10001c00;
|
||||
dst=(void (*)(void)) (__sram_top);
|
||||
|
||||
DoString(0,8,"Enter RAM!");
|
||||
DoIntX(0,16,(uint32_t)function);
|
||||
|
@ -58,7 +60,7 @@ void execute_file (const char * fname){
|
|||
return;
|
||||
};
|
||||
|
||||
res = f_read(&file, (char *)dst, 2048, &readbytes);
|
||||
res = f_read(&file, (char *)dst, RAMCODE, &readbytes);
|
||||
put_rc_y(res,8);
|
||||
if(res){
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue