From 032ac5bc6f7aedcdd04a1420d97e3b5a5f616f70 Mon Sep 17 00:00:00 2001 From: joek Date: Fri, 22 Oct 2010 11:22:47 +0200 Subject: [PATCH] Starting 'hcs12x' branch --- arch/hc1x/hcs12d/drivers/Dio.c | 30 +++++-- arch/hc1x/hcs12d/drivers/Port.c | 10 ++- arch/hc1x/hcs12d/kernel/arch.c | 10 ++- arch/hc1x/hcs12d/kernel/arch_krn.sx | 1 + arch/hc1x/hcs12d/kernel/context.h | 16 +++- arch/hc1x/hcs12d/kernel/context.sx | 16 +++- arch/hc1x/hcs12d/scripts/linkscript_gcc.ldf | 91 +++++++++++---------- boards/board_common.mk | 2 +- boards/hcs12_elmicro_card12/memory.ldf | 50 +++++------ common/newlib_port.c | 42 ++++++++++ common/printf.c | 57 +++++++------ scripts/rules.mk | 2 +- system/kernel/makefile | 2 +- 13 files changed, 218 insertions(+), 111 deletions(-) diff --git a/arch/hc1x/hcs12d/drivers/Dio.c b/arch/hc1x/hcs12d/drivers/Dio.c index 74fc0432..032e4d4b 100644 --- a/arch/hc1x/hcs12d/drivers/Dio.c +++ b/arch/hc1x/hcs12d/drivers/Dio.c @@ -115,7 +115,10 @@ Dio_LevelType Dio_ReadChannel(Dio_ChannelType channelId) level = STD_LOW; } - cleanup: return (level); +#if ( DIO_DEV_ERROR_DETECT == STD_ON ) + cleanup: +#endif + return (level); } void Dio_WriteChannel(Dio_ChannelType channelId, Dio_LevelType level) @@ -133,7 +136,10 @@ void Dio_WriteChannel(Dio_ChannelType channelId, Dio_LevelType level) Dio_WritePort(DIO_GET_PORT_FROM_CHANNEL_ID(channelId), portVal); - cleanup: return; +#if ( DIO_DEV_ERROR_DETECT == STD_ON ) + cleanup: +#endif + return; } Dio_PortLevelType Dio_ReadPort(Dio_PortType portId) @@ -152,7 +158,10 @@ Dio_PortLevelType Dio_ReadPort(Dio_PortType portId) else if(portId == DIO_PORT_T){level = PTT;} else if(portId == DIO_PORT_H){level = PTH;} - cleanup: return level; +#if ( DIO_DEV_ERROR_DETECT == STD_ON ) + cleanup: +#endif + return level; } void Dio_WritePort(Dio_PortType portId, Dio_PortLevelType level) @@ -170,7 +179,10 @@ void Dio_WritePort(Dio_PortType portId, Dio_PortLevelType level) else if(portId == DIO_PORT_T){PTT = level;} else if(portId == DIO_PORT_H){PTH = level;} - cleanup: return; +#if ( DIO_DEV_ERROR_DETECT == STD_ON ) + cleanup: +#endif + return; } Dio_PortLevelType Dio_ReadChannelGroup( @@ -185,7 +197,10 @@ Dio_PortLevelType Dio_ReadChannelGroup( // Shift down level = level >> channelGroupIdPtr->offset; - cleanup: return level; +#if ( DIO_DEV_ERROR_DETECT == STD_ON ) + cleanup: +#endif + return level; } void Dio_WriteChannelGroup(const Dio_ChannelGroupType *channelGroupIdPtr, @@ -204,5 +219,8 @@ void Dio_WriteChannelGroup(const Dio_ChannelGroupType *channelGroupIdPtr, Dio_WritePort(channelGroupIdPtr->port, portVal); - cleanup: return; +#if ( DIO_DEV_ERROR_DETECT == STD_ON ) + cleanup: +#endif + return; } diff --git a/arch/hc1x/hcs12d/drivers/Port.c b/arch/hc1x/hcs12d/drivers/Port.c index 55f8e9d2..9045ff95 100644 --- a/arch/hc1x/hcs12d/drivers/Port.c +++ b/arch/hc1x/hcs12d/drivers/Port.c @@ -162,7 +162,10 @@ void Port_Init(const Port_ConfigType *configType) _portState = PORT_INITIALIZED; _configPtr = configType; - cleanup: return; +#if (PORT_DEV_ERROR_DETECT == STD_ON) + cleanup: +#endif + return; } /** @req PORT141 */ @@ -327,7 +330,10 @@ void Port_RefreshPortDirection(void) DDRT = curValue; #endif - cleanup: return; +#if (PORT_DEV_ERROR_DETECT == STD_ON) + cleanup: +#endif + return; } /** req PORT143 */ diff --git a/arch/hc1x/hcs12d/kernel/arch.c b/arch/hc1x/hcs12d/kernel/arch.c index a072cf05..0252a9e8 100644 --- a/arch/hc1x/hcs12d/kernel/arch.c +++ b/arch/hc1x/hcs12d/kernel/arch.c @@ -59,17 +59,21 @@ void Os_ArchSetupContext( OsPcbType *pcb ) { */ void Os_ArchSetTaskEntry(OsPcbType *pcbPtr ) { - uint16_t *context_words = (uint16_t *)pcbPtr->stack.curr; uint8_t *context_bytes = (uint8_t *)pcbPtr->stack.curr; + uint16_t temp; /* Set Return to start function */ context_bytes[8] = OS_KERNEL_CODE_PPAGE; if( pcbPtr->proc_type == PROC_EXTENDED ) { - context_words[8] = (uint16_t)Os_TaskStartExtended; + temp = (uint16_t)Os_TaskStartExtended; + context_bytes[HIGH_BYTE_RETURN_ADRESS] = temp >> 8; + context_bytes[LOW_BYTE_RETURN_ADRESS] = temp & 0xFF; } else if( pcbPtr->proc_type == PROC_BASIC ) { - context_words[8] = (uint16_t)Os_TaskStartBasic; + temp = (uint16_t)Os_TaskStartBasic; + context_bytes[HIGH_BYTE_RETURN_ADRESS] = temp >> 8; + context_bytes[LOW_BYTE_RETURN_ADRESS] = temp & 0xFF; } } diff --git a/arch/hc1x/hcs12d/kernel/arch_krn.sx b/arch/hc1x/hcs12d/kernel/arch_krn.sx index 72204e2b..b8454ef6 100644 --- a/arch/hc1x/hcs12d/kernel/arch_krn.sx +++ b/arch/hc1x/hcs12d/kernel/arch_krn.sx @@ -2,6 +2,7 @@ #define _ASSEMBLER_ #include "kernel_offset.h" +#include "context.h" #include "asm_hc1x.sx" #include "context.sx" diff --git a/arch/hc1x/hcs12d/kernel/context.h b/arch/hc1x/hcs12d/kernel/context.h index 5e06fca4..d06b3368 100644 --- a/arch/hc1x/hcs12d/kernel/context.h +++ b/arch/hc1x/hcs12d/kernel/context.h @@ -33,7 +33,19 @@ #define SC_PATTERN 0xde #define LC_PATTERN 0xad -#define CONTEXT_SIZE_W 9 - +#if defined(CFG_HCS12D) +#define Y_SP_OFFSET 6 // The offset from P to Y in the context +#define CONTEXT_SIZE_W 9 // The context size in words +#define HIGH_BYTE_RETURN_ADRESS 16 // The offset in the context that contains the high order byte of return address +#define LOW_BYTE_RETURN_ADRESS 17 // The offset in the context that contains the low order byte of return address + +#elif defined(CFG_HCS12XD) +#define Y_SP_OFFSET 7 // The offset from P to Y in the context +#define CONTEXT_SIZE_W 10 // The context size in words ( Actual size 9+1/2) +#define HIGH_BYTE_RETURN_ADRESS 17 // The offset in the context that contains the high order byte of return address +#define LOW_BYTE_RETURN_ADRESS 18 // The offset in the context that contains the low order byte of return address +#else +#error "HC1X: Subarchitecture not defined." +#endif #endif /* CONTEXT_H_ */ diff --git a/arch/hc1x/hcs12d/kernel/context.sx b/arch/hc1x/hcs12d/kernel/context.sx index 6e271754..b3d1c89b 100644 --- a/arch/hc1x/hcs12d/kernel/context.sx +++ b/arch/hc1x/hcs12d/kernel/context.sx @@ -38,7 +38,12 @@ sty 1, -sp // save Y -> ctx(Y) stx 2, -sp // save X -> ctx(X) stab 2, -sp // save B -> ctx(B) (skipping ctx(A)) +#ifdef CFG_HCS12D pshc // save CCR -> ctx(CCR) +#endif +#ifdef CFG_HCS12XD + .short 0x1839 // save CCR -> ctx(CCR) +#endif psha // save P -> ctx(P) * movw _.tmp ,2,-sp // save tmp -> ctx(tmp) movw _.xy, 2,-sp // save xy -> ctx(xy) @@ -51,9 +56,14 @@ movw 2,sp+, _.z // load z <- ctx(z) movw 2,sp+, _.xy // load xy <- ctx(xy) movw 2,sp+, _.tmp // load tmp <- ctx(tmp) - ldy 6,sp // load Y <- ctx(Y) - movb 1,sp+, 6,sp // move ctx(P) -> callctx(P) - pulc // load CCR <- ctx(CCR) + ldy Y_SP_OFFSET,sp // load Y <- ctx(Y) + movb 1,sp+, Y_SP_OFFSET,sp // move ctx(P) -> callctx(P) +#ifdef CFG_HCS12D + pulc // save CCR -> ctx(CCR) +#endif +#ifdef CFG_HCS12XD + .short 0x1838 // load CCR <- ctx(CCR) +#endif puld // load D <- ctx(D) pulx // load X <- ctx(X) ins // skipping ctx(Yh) diff --git a/arch/hc1x/hcs12d/scripts/linkscript_gcc.ldf b/arch/hc1x/hcs12d/scripts/linkscript_gcc.ldf index ac116f9e..cf747efb 100644 --- a/arch/hc1x/hcs12d/scripts/linkscript_gcc.ldf +++ b/arch/hc1x/hcs12d/scripts/linkscript_gcc.ldf @@ -135,13 +135,12 @@ SECTIONS /* PPAGE memory banks */ - - .bank8 : + .bank_A : { - *(.bank8) - *(.text.bank8*) + *(.bank_A) + *(.text.bank_A*) - /* BANK8 MODULES */ + /* BANK_A MODULES */ Os_Cfg.o(.text) EcuM.o(.text) EcuM_Cfg.o(.text) @@ -154,14 +153,14 @@ SECTIONS alarm.o(.text) . = ALIGN(2); - } > bank8 AT>bank8_lma =0xff + } > bank_A AT>bank_A_lma =0xff - .bank9 : + .bank_B : { - *(.bank9) - *(.text.bank9*) + *(.bank_B) + *(.text.bank_B*) - /* BANK9 MODULES */ + /* BANK_B MODULES */ resource.o(.text) sched_table.o(.text) counter.o(.text) @@ -174,15 +173,16 @@ SECTIONS newlib_port.o(.text) . = ALIGN(2); - } > bank9 AT>bank9_lma =0xff + } > bank_B AT>bank_B_lma =0xff - .bank10 : + .bank_C : { - *(.bank10) - *(.text.bank10*) + *(.bank_C) + *(.text.bank_C*) - /* BANK10 MODULES */ + /* BANK_C MODULES */ + printf.o(.text) *_memcpy.o(.text) *_memset.o(.text) *_abort.o(.text) @@ -211,56 +211,58 @@ SECTIONS *_memcpy.o(.text) . = ALIGN(2); - } > bank10 AT>bank10_lma =0xff + } > bank_C AT>bank_C_lma =0xff - .bank11 : + .bank_D : { - *(.bank11) - *(.text.bank11*) + *(.bank_D) + *(.text.bank_D*) - /* BANK11 MODULES */ + /* BANK_D MODULES */ Can*.o(.text) Pdu*.o(.text) Dio*.o(.text) . = ALIGN(2); - } > bank11 AT>bank11_lma =0xff + } > bank_D AT>bank_D_lma =0xff - .bank12 : + .bank_E : { - *(.bank12) - *(.text.bank12*) + *(.bank_E) + *(.text.bank_E*) - /* BANK12 MODULES */ - Com*.o(.text) + /* BANK_E MODULES */ Port*.o(.text) + Com*.o(.text) . = ALIGN(2); - } > bank12 AT>bank12_lma =0xff + } > bank_E AT>bank_E_lma =0xff - .bank13 : + .bank_F : { - *(.bank13) - *(.text.bank13*) + *(.bank_F) + *(.text.bank_F*) - /* BANK13 MODULES */ + /* BANK_F MODULES */ Adc*.o(.text) - . = ALIGN(2); - } > bank13 AT>bank13_lma =0xff + Dem*.o(.text) + IoHwAb*.o(.text) + . = ALIGN(2); + } > bank_F AT>bank_F_lma =0xff /* Start of text section. */ .stext : { *(.stext) - } > text AT>bank14_lma + } > text AT>bank_FIX1_lma .init : { *(.init) - } AT>bank14_lma =0 + } AT>bank_FIX1_lma =0 .text : { /* Put startup code at beginning so that _start keeps same address. */ @@ -287,17 +289,17 @@ SECTIONS _etext = .; PROVIDE (etext = .); . = ALIGN(2); - } > text AT>bank14_lma =0xa7a7a7a7 + } > text AT>bank_FIX1_lma =0xa7a7a7a7 .eh_frame : { KEEP (*(.eh_frame)) - } > text AT>bank14_lma + } > text AT>bank_FIX1_lma .gcc_except_table : { *(.gcc_except_table) - } > text AT>bank14_lma + } > text AT>bank_FIX1_lma .rodata : { @@ -305,13 +307,13 @@ SECTIONS *(.rodata.*) *(.gnu.linkonce.r*) . = ALIGN(2); - } > text_h AT>bank15_lma =0xffffffff + } > text_h AT>bank_FIX2_lma =0xffffffff .rodata1 : { *(.rodata1) . = ALIGN(2); - } > text_h AT>bank15_lma =0xffffffff + } > text_h AT>bank_FIX2_lma =0xffffffff /* Constructor and destructor tables are in ROM. */ /* @@ -353,7 +355,7 @@ SECTIONS _edata = .; PROVIDE (edata = .); . = ALIGN(2); - } > data AT>bank15_lma =0xffffffff + } > data AT>bank_FIX2_lma =0xffffffff __data_section_size = SIZEOF(.data); PROVIDE (__data_section_size = SIZEOF(.data)); __data_image_end = __data_image + __data_section_size; @@ -365,6 +367,11 @@ SECTIONS *(.dem_eventmemory_pri) } > data + .noice_port 0x2000 : + { + *(.noice_port) + } > data + /* SCz: this does not work yet... This is supposed to force the loading of _map_data.o (from libgcc.a) when the .data section is not empty. By doing so, this should bring the code that copies the .data section @@ -390,7 +397,7 @@ SECTIONS *(.gnu.linkonce.b.*) *(COMMON) PROVIDE (_end = .); - } > data AT>bank15_lma + } > data AT>bank_FIX2_lma __bss_size = SIZEOF(.bss); PROVIDE (__bss_size = SIZEOF(.bss)); .eeprom : diff --git a/boards/board_common.mk b/boards/board_common.mk index d2c18ec9..d0935ee4 100644 --- a/boards/board_common.mk +++ b/boards/board_common.mk @@ -1,5 +1,5 @@ obj-$(CFG_PPC) += crt0.o -obj-$(CFG_HCS12D) += crt0.o +obj-$(CFG_HC1X) += crt0.o vpath-$(CFG_ARM_CM3) += $(ARCH_PATH-y)kernel obj-$(CFG_ARM_CM3) += core_cm3.o obj-$(CFG_ARM_CM3) += startup_stm32f10x.o diff --git a/boards/hcs12_elmicro_card12/memory.ldf b/boards/hcs12_elmicro_card12/memory.ldf index 5ce02782..22c9397e 100644 --- a/boards/hcs12_elmicro_card12/memory.ldf +++ b/boards/hcs12_elmicro_card12/memory.ldf @@ -18,38 +18,38 @@ text_h (rx) : ORIGIN = 0xc002, LENGTH = 16k-0x102 vectors (rx) : ORIGIN = 0xff80, LENGTH = 0x80 /* Flash memory banks VMA:s */ -bank8 (rx) : ORIGIN = 0x0f0000, LENGTH = 16k -bank9 (rx) : ORIGIN = 0x0f4000, LENGTH = 16k -bank10 (rx) : ORIGIN = 0x0f8000, LENGTH = 16k -bank11 (rx) : ORIGIN = 0x0fc000, LENGTH = 16k -bank12 (rx) : ORIGIN = 0x100000, LENGTH = 16k -bank13 (rx) : ORIGIN = 0x104000, LENGTH = 16k +bank_A (rx) : ORIGIN = 0x0f0000, LENGTH = 16k +bank_B (rx) : ORIGIN = 0x0f4000, LENGTH = 16k +bank_C (rx) : ORIGIN = 0x0f8000, LENGTH = 16k +bank_D (rx) : ORIGIN = 0x0fc000, LENGTH = 16k +bank_E (rx) : ORIGIN = 0x100000, LENGTH = 16k +bank_F (rx) : ORIGIN = 0x104000, LENGTH = 16k -bank14 (rx) : ORIGIN = 0x108000, LENGTH = 16k -bank15 (rx) : ORIGIN = 0x10c002, LENGTH = 16k-0x102 +bank_FIX1 (rx) : ORIGIN = 0x108000, LENGTH = 16k +bank_FIX2 (rx) : ORIGIN = 0x10c002, LENGTH = 16k-0x102 /* Flash memory banks LMA:s */ /* iSystem winIDEA */ -bank8_lma (rx) : ORIGIN = 0x0f0000, LENGTH = 16k -bank9_lma (rx) : ORIGIN = 0x0f4000, LENGTH = 16k -bank10_lma (rx) : ORIGIN = 0x0f8000, LENGTH = 16k -bank11_lma (rx) : ORIGIN = 0x0fc000, LENGTH = 16k -bank12_lma (rx) : ORIGIN = 0x100000, LENGTH = 16k -bank13_lma (rx) : ORIGIN = 0x104000, LENGTH = 16k +bank_A_lma (rx) : ORIGIN = 0x0f0000, LENGTH = 16k +bank_B_lma (rx) : ORIGIN = 0x0f4000, LENGTH = 16k +bank_C_lma (rx) : ORIGIN = 0x0f8000, LENGTH = 16k +bank_D_lma (rx) : ORIGIN = 0x0fc000, LENGTH = 16k +bank_E_lma (rx) : ORIGIN = 0x100000, LENGTH = 16k +bank_F_lma (rx) : ORIGIN = 0x104000, LENGTH = 16k -bank14_lma (rx) : ORIGIN = 0x108000, LENGTH = 16k -bank15_lma (rx) : ORIGIN = 0x10c002, LENGTH = 16k-0x102 +bank_FIX1_lma (rx) : ORIGIN = 0x108000, LENGTH = 16k +bank_FIX2_lma (rx) : ORIGIN = 0x10c002, LENGTH = 16k-0x102 vectors_lma (rx) : ORIGIN = 0x10ff80, LENGTH = 0x80 /* Freescale Codewarrior Hiwave (s19, TBDML) -bank8_lma (rx) : ORIGIN = 0x388000, LENGTH = 16k -bank9_lma (rx) : ORIGIN = 0x398000, LENGTH = 16k -bank10_lma (rx) : ORIGIN = 0x3a8000, LENGTH = 16k -bank11_lma (rx) : ORIGIN = 0x3b8000, LENGTH = 16k -bank12_lma (rx) : ORIGIN = 0x3c8000, LENGTH = 16k -bank13_lma (rx) : ORIGIN = 0x3d8000, LENGTH = 16k +bank_A_lma (rx) : ORIGIN = 0x388000, LENGTH = 16k +bank_B_lma (rx) : ORIGIN = 0x398000, LENGTH = 16k +bank_C_lma (rx) : ORIGIN = 0x3a8000, LENGTH = 16k +bank_D_lma (rx) : ORIGIN = 0x3b8000, LENGTH = 16k +bank_E_lma (rx) : ORIGIN = 0x3c8000, LENGTH = 16k +bank_F_lma (rx) : ORIGIN = 0x3d8000, LENGTH = 16k -bank14_lma (rx) : ORIGIN = 0x3e8000, LENGTH = 16k -bank15_lma (rx) : ORIGIN = 0x3f8002, LENGTH = 16k-0x102 +bank_FIX1_lma (rx) : ORIGIN = 0x3e8000, LENGTH = 16k +bank_FIX2_lma (rx) : ORIGIN = 0x3f8002, LENGTH = 16k-0x102 vectors_lma (rx) : ORIGIN = 0x3fff80, LENGTH = 0x80 -*/ \ No newline at end of file +*/ diff --git a/common/newlib_port.c b/common/newlib_port.c index 60a75679..6db2292c 100644 --- a/common/newlib_port.c +++ b/common/newlib_port.c @@ -82,6 +82,13 @@ static volatile char g_TConn __attribute__ ((section (".winidea_port"))); #define FILE_RAMLOG 3 +/* Location MUST match NoICE configuration */ +#ifdef USE_TTY_NOICE +static volatile char VUART_TX __attribute__ ((section (".noice_port"))); +static volatile char VUART_RX __attribute__ ((section (".noice_port"))); +volatile unsigned char START_VUART = 0; +#endif + /* * T32 stuff */ @@ -194,6 +201,17 @@ int read( int fd, void *buf, size_t nbytes ) (void)g_TRBuffer[0]; #endif +#ifdef USE_TTY_NOICE + // Not tested at all + int retval; + while (VUART_RX != 0) + { + } + + retval = VUART_RX; + VUART_RX = 0; +#endif + /* Only support write for now, return 0 read */ return 0; } @@ -206,6 +224,30 @@ int write( int fd, const void *_buf, size_t nbytes) if( fd <= STDERR_FILENO ) { +#ifdef USE_TTY_NOICE + char *buf1 = (char *)_buf; + if (START_VUART) + { + for (int i = 0; i < nbytes; i++) { + char c = buf1[i]; + if (c == '\n') + { + while (VUART_TX != 0) + { + } + + VUART_TX = '\r'; + } + + while (VUART_TX != 0) + { + } + + VUART_TX = c; + } + } +#endif + #ifdef USE_TTY_WINIDEA if (g_TConn) { diff --git a/common/printf.c b/common/printf.c index 028ff81c..dfded21c 100644 --- a/common/printf.c +++ b/common/printf.c @@ -48,7 +48,7 @@ //#define HOST_TEST 1 -int arc_putchar(int fd, int c); +int arc_putchar(_PTR fd, int c); int print(FILE *file, char **buffer, size_t n, const char *format, va_list ap); int printf(const char *format, ...) { @@ -305,17 +305,20 @@ int print(FILE *file, char **buffer, size_t n, const char *format, va_list ap) } /* Find flags */ - switch (ch) { - case '0': + if (ch == '0') + { flags = FL_ZERO; - break; - case ' ': + } + else if (ch == ' ') + { flags = FL_SPACE; - break; - case '-': + } + else if (ch == '-') + { flags = FL_ALIGN_LEFT; - break; - default: + } + else + { /* Not supported or no flag */ flags = FL_NONE; format--; @@ -333,27 +336,32 @@ int print(FILE *file, char **buffer, size_t n, const char *format, va_list ap) } /* Find type */ - switch (ch) { - case 'c': + if (ch =='c') + { emitChar(file,buffer,(char )va_arg( ap, int ),&left); - break; - case 'd': + } + else if (ch == 'd') + { flags |= FL_TYPE_SIGNED_INT; emitInt(file,buffer,va_arg( ap, int ),10,width,flags,&left); - break; - case 'u': + } + else if (ch == 'u') + { flags |= FL_TYPE_UNSIGNED_INT; emitInt(file,buffer,va_arg( ap, int ),10,width,flags,&left); - break; - case 'x': + } + else if (ch == 'x') + { flags |= FL_TYPE_UNSIGNED_INT; emitInt(file,buffer,va_arg( ap, int ),16,width,flags,&left); - break; - case 'p': + } + else if (ch == 'p') + { flags |= FL_TYPE_POINTER; emitInt(file,buffer,va_arg( ap, int ),16,width,flags,&left); - break; - case 's': + } + else if (ch == 's') + { str = (char *)va_arg( ap, int ); if( str == NULL ) { @@ -361,12 +369,11 @@ int print(FILE *file, char **buffer, size_t n, const char *format, va_list ap) } emitString(file,buffer,str,width,flags,&left); - break; - default: + } + else + { assert(0); // oops - break; } - } else { flags = FL_NONE; emitChar(file,buffer,ch,&left); diff --git a/scripts/rules.mk b/scripts/rules.mk index 8e2aff80..aa59d104 100644 --- a/scripts/rules.mk +++ b/scripts/rules.mk @@ -183,7 +183,7 @@ ifeq ($(CROSS_COMPILE),) $(Q)$(CC) $(LDFLAGS) -o $@ $(libpath-y) $(obj-y) $(lib-y) $(libitem-y) else $(Q)$(LD) $(LDFLAGS) -T $(ldcmdfile-y) -o $@ $(libpath-y) --start-group $(obj-y) $(lib-y) $(libitem-y) --end-group $(LDMAPFILE) -ifdef CFG_MC912DG128A +ifdef CFG_HC1X @$(CROSS_COMPILE)objdump -h $@ | gawk -f $(ROOTDIR)/scripts/hc1x_memory.awk else @echo "Image size: (decimal)" diff --git a/system/kernel/makefile b/system/kernel/makefile index 9ab1ff07..aeb1102e 100644 --- a/system/kernel/makefile +++ b/system/kernel/makefile @@ -5,7 +5,7 @@ vpath-y += $(ARCH_PATH-y)/kernel obj-y += asm_sample.o #CFLAGS_asm_sample.o += -O3 obj-y += arch_krn.o -obj-$(CFG_HCS12D) += arch_irq.o +obj-$(CFG_HC1X) += arch_irq.o #obj-y += stm32f10x_it.o # object files -- 2.39.2