diff --git a/Makefile b/Makefile index cdfb02d..613a0c3 100644 --- a/Makefile +++ b/Makefile @@ -47,7 +47,7 @@ $(BUILDDIR)%.rel: $(BUILDDIR)%.asm ${ASM} ${AFLAGS} -o $@ $< # mv -f $(addprefix $(basename $^), .lst .rel .sym) . -$(BUILDDIR)rtlplayground.ihx: $(BUILDDIR)crtstart.rel $(OBJS) +$(BUILDDIR)rtlplayground.ihx: $(BUILDDIR)crtstart.rel $(OBJS) $(CC) $(CC_FLAGS) -Wl-bHOME=${BOOTLOADER_ADDRESS} -Wl-bBANK1=0x14000 -Wl-r -o $@ $^ $(BUILDDIR)rtlplayground.img: $(BUILDDIR)rtlplayground.ihx @@ -63,4 +63,4 @@ $(BUILDDIR)rtlplayground.bin: $(BUILDDIR)rtlplayground.img tools/$(BUILDDIR)fileadder -a $(HTML_LOCATION) -s $(IMAGESIZE) -d html -p html_data $@ -.PHONY: clean all $(SUBDIRS) \ No newline at end of file +.PHONY: clean all $(SUBDIRS) diff --git a/cmd_parser.c b/cmd_parser.c index 361670a..3a8ae3e 100644 --- a/cmd_parser.c +++ b/cmd_parser.c @@ -18,6 +18,7 @@ #include "uip/uip.h" #pragma codeseg BANK1 +#pragma constseg BANK1 extern __xdata uint8_t minPort; extern __xdata uint8_t maxPort; diff --git a/httpd/Makefile b/httpd/Makefile index d801ddf..08b7023 100644 --- a/httpd/Makefile +++ b/httpd/Makefile @@ -17,8 +17,6 @@ $(BUILDDIR)%.asm: %.c $(CC) $(CC_FLAGS) -o $@ -c -S $< $(BUILDDIR)%.rel: $(BUILDDIR)%.asm - ./treatasm.py $^ >$^.new - mv $^.new $^ ${ASM} ${AFLAGS} -o $@ $^ clean: diff --git a/httpd/httpd.c b/httpd/httpd.c index 98f0d24..289308a 100644 --- a/httpd/httpd.c +++ b/httpd/httpd.c @@ -16,6 +16,7 @@ #define CMARK_S 6 #pragma codeseg BANK1 +#pragma constseg BANK1 extern __code struct f_data f_data[]; extern __code char * __code mime_strings[]; diff --git a/rtl837x_phy.c b/rtl837x_phy.c index 420976e..633eef5 100644 --- a/rtl837x_phy.c +++ b/rtl837x_phy.c @@ -17,6 +17,7 @@ #include "phy.h" #pragma codeseg BANK1 +#pragma constseg BANK1 extern __code uint16_t bit_mask[16]; diff --git a/rtl837x_port.c b/rtl837x_port.c index c603c75..0539ea5 100644 --- a/rtl837x_port.c +++ b/rtl837x_port.c @@ -15,6 +15,7 @@ #include "phy.h" #pragma codeseg BANK1 +#pragma constseg BANK1 extern __code uint8_t * __code hex; extern __code uint16_t bit_mask[16]; diff --git a/tools/fileadder.c b/tools/fileadder.c index 7b739d8..71d862b 100644 --- a/tools/fileadder.c +++ b/tools/fileadder.c @@ -276,7 +276,7 @@ int main(int argc, char **argv) if (arguments.prefix) ibuf_p += snprintf(&ibuf[ibuf_p], INDEX_SIZE - ibuf_p, "#include \"%s.h\"\n\n", arguments.prefix); if (arguments.bank) - ibuf_p += snprintf(&ibuf[ibuf_p], INDEX_SIZE - ibuf_p, "#pragma codeseg %s\n\n", arguments.bank); + ibuf_p += snprintf(&ibuf[ibuf_p], INDEX_SIZE - ibuf_p, "#pragma codeseg %s\n#pragma constseg %s\n\n", arguments.bank, arguments.bank); ibuf_p += snprintf(&ibuf[ibuf_p], INDEX_SIZE - ibuf_p, " __code char * __code mime_strings[] = {\n \"text/html\",\n \"image/svg+xml\",\n" " \"image/svg+xml\",\n \"image/png\",\n \"text/javascript\",\n \"text/css\",\n \"text/plain\"};\n\n"); ibuf_p += snprintf(&ibuf[ibuf_p], INDEX_SIZE - ibuf_p, "__code struct f_data f_data[] = {\n"); diff --git a/uip/psock.c b/uip/psock.c index ca92d8e..eb4d1af 100644 --- a/uip/psock.c +++ b/uip/psock.c @@ -48,6 +48,7 @@ #define STATE_DATA_SENT 6 #pragma codeseg BANK1 +#pragma constseg BANK1 /* * Return value of the buffering functions that indicates that a diff --git a/uip/timer.c b/uip/timer.c index 7322c1e..cb52151 100644 --- a/uip/timer.c +++ b/uip/timer.c @@ -49,6 +49,7 @@ #include "timer.h" #pragma codeseg BANK1 +#pragma constseg BANK1 /*---------------------------------------------------------------------------*/ /** diff --git a/uip/uip-fw.c b/uip/uip-fw.c index 44b34f5..4b66979 100644 --- a/uip/uip-fw.c +++ b/uip/uip-fw.c @@ -60,6 +60,7 @@ #include "uip-fw.h" #pragma codeseg BANK1 +#pragma constseg BANK1 #include "../rtl837x_common.h" diff --git a/uip/uip-neighbor.c b/uip/uip-neighbor.c index b8f9912..0795cef 100644 --- a/uip/uip-neighbor.c +++ b/uip/uip-neighbor.c @@ -44,7 +44,7 @@ #include "../rtl837x_common.h" #pragma codeseg BANK1 - +#pragma constseg BANK1 #define MAX_TIME 128 diff --git a/uip/uip-split.c b/uip/uip-split.c index cc52699..0cc1faa 100644 --- a/uip/uip-split.c +++ b/uip/uip-split.c @@ -41,8 +41,8 @@ #include "uip-fw.h" #include "uip_arch.h" - #pragma codeseg BANK1 +#pragma constseg BANK1 #define BUF ((__xdata struct uip_tcpip_hdr *)&uip_buf[UIP_LLH_LEN]) diff --git a/uip/uip.c b/uip/uip.c index 2f76efc..ad64329 100644 --- a/uip/uip.c +++ b/uip/uip.c @@ -84,6 +84,7 @@ #include "uip_arch.h" #pragma codeseg BANK1 +#pragma constseg BANK1 #if UIP_CONF_IPV6 #include "uip-neighbor.h" diff --git a/uip/uip_arp.c b/uip/uip_arp.c index 42dab10..ca8ad1e 100644 --- a/uip/uip_arp.c +++ b/uip/uip_arp.c @@ -64,6 +64,7 @@ #include "../rtl837x_common.h" #pragma codeseg BANK1 +#pragma constseg BANK1 struct arp_hdr_i { struct uip_eth_hdr ethhdr; diff --git a/uip/uiplib.c b/uip/uiplib.c index 62dc253..808a5f1 100644 --- a/uip/uiplib.c +++ b/uip/uiplib.c @@ -38,6 +38,7 @@ #include "uiplib.h" #pragma codeseg BANK1 +#pragma constseg BANK1 /*-----------------------------------------------------------------------------------*/ unsigned char