Ignore:
Timestamp:
Jun 1, 2020, 6:25:09 PM (4 years ago)
Author:
coas-nagasima
Message:

メモリ割り当てが悪く動かないのを修正

Location:
EcnlProtoTool/trunk/prototool
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • EcnlProtoTool/trunk/prototool/.cproject

    r426 r427  
    1616                                <option id="toolchain.id" value="gcc-arm-embedded"/>
    1717                                <option id="toolchain.version" value="6.3.1.20170620"/>
     18                                <option id="toolchain.enable" value="false"/>
    1819                        </storageModule>
    1920                        <storageModule moduleId="cdtBuildSystem" version="4.0.0">
  • EcnlProtoTool/trunk/prototool/src/linker_scriptDebug.ld

    r426 r427  
    88
    99MEMORY {
    10         ROM (rx)         : ORIGIN = 0x18000000, LENGTH = 0x07FFC000
    11         RAM (xrw)        : ORIGIN = 0x20000000, LENGTH = 10M
     10        BOOT_LOADER      : ORIGIN = 0x18000000, LENGTH = 0x00220000
     11        ROM (rx)         : ORIGIN = 0x18220000, LENGTH = 0x005E0000
     12        RAM (xrw)        : ORIGIN = 0x20100000, LENGTH = 8M
    1213}
    1314
     
    1920        .boot : {
    2021                KEEP(*(.boot))
    21         } > ROM
     22        } > BOOT_LOADER
    2223
    2324        .text : {
    2425                __start_text = .;
    25                 *(.vector)
    26                 *(.text)
     26                KEEP(*(.vector))
     27                *(.text*)
    2728                *(.glue_7t)
    2829                *(.glue_7)
     30                KEEP(*(.init))
     31                KEEP(*(.fini))
    2932                __end_kernel = .;
    3033        } > ROM
     
    3437        .rodata ALIGN(4) : {
    3538                __start_rodata = .;
    36                 *(.rodata)
     39                *(.rodata*)
    3740                __end_rodata = .;
    3841        } > ROM
     
    6265        .data : ALIGN(4) {
    6366                __start_data = .;
    64                 *(.data)
     67                *(.data*)
     68                *(.got*)
    6569                __end_data = .;
    6670        } > RAM AT > ROM
     
    7276        .bss ALIGN(4) : {
    7377                __start_bss = .;
    74                 *(.bss)
     78                *(.bss*)
    7579                *(COMMON)
    7680                __end_bss = .;
  • EcnlProtoTool/trunk/prototool/src/main.c

    r331 r427  
    514514
    515515void _start_c(long *p);
    516 int _data, _mdata, _edata;
    517 int _bss, _ebss;
     516extern int __start_idata, __start_data, __end_data;
     517extern int __start_bss, __end_bss;
    518518
    519519void _PowerON_Reset(long *args)
    520520{
    521         memcpy(&_data, &_mdata, (size_t)&_edata - (size_t)&_data);
    522         memset(&_bss, 0, (size_t)&_ebss - (size_t)&_bss);
     521        memcpy(&__start_data, &__start_idata, (size_t)&__end_data - (size_t)&__start_data);
     522        memset(&__start_bss, 0, (size_t)&__end_bss - (size_t)&__start_bss);
    523523
    524524        _start_c(args);
    525525}
    526526
    527 #define FVECT_SECT          __attribute__ ((section (".fvectors")))
     527#define FVECT_SECT          __attribute__ ((section (".vector")))
    528528const void *HardwareVectors[] FVECT_SECT = {
    529529        _PowerON_Reset,
    530530        mrdb_break,
    531531};
    532 
    533 char stack_space[0x100000] __attribute__ ((section (".stack")));
Note: See TracChangeset for help on using the changeset viewer.