Darius Galis’s reputation

Darius Galis's reputation

Total 426
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+5
August 13, 2017 Up vote answer How to place a function RAM?
+2
July 21, 2017 Selected answer How to place a function RAM?
+10
July 14, 2017 Answered How to place a function RAM?
+1
July 26, 2016 Commented Hello Adam, Thank you for your reply. If you want to load the .code section into SRAM, then copy it to SDRAM, and you will have access to the begin\end addresses of this region. I suggest to modify your .code section from your linker script as follows: .code : { gExecutableCodeRamStart = .; gExecutableCodeRomStart = LOADADDR (.code); PROVIDE_HIDDEN (__exidx_start = .); *(.init) PROVIDE_HIDDEN (__exidx_end = .); *(.text) *(.fini) *(.jcr) __CTOR_LIST__ = .; . = ALIGN(2); __ctors = .; *(.ctors) __ctors_end = .; __CTOR_END__ = .; __DTOR_LIST__ = .; ___dtors = .; *(.dtors) ___dtors_end = .; __DTOR_END__ = .; . = ALIGN(2); _mdata = .; _srodata = .; *(.rodata)*(.rodata.*) . = ALIGN(0x04); _erodata = .; gExecutableCodeRamEnd = .; gExecutableCodeRomEnd = LOADADDR (.code) + SIZEOF(.code); } > SDRAM AT > SRAM The assignments: gExecutableCodeRamStart = .; gExecutableCodeRamEnd = .; gExecutableCodeRomStart = LOADADDR (.code); gExecutableCodeRomEnd = LOADADDR (.code) + SIZEOF(.code); mean the following: * gExecutableCodeRamStart will have, when the program is running, the start address value of the .code section * gExecutableCodeRamEnd will have,when the program is running. the end value of the.code section * gExecutableCodeRomStart will have the address from where the .code is copied in the SDRAM. * gExecutableCodeRomEnd will have the address from where the .code + sizeof(.code) is copied in the SDRAM. >>So how do I get these addresses from the linker? If you want to use them in a .c file, simply declare them as follows: extern char *gExecutableCodeRomStart; If you believe we can be of any further assistance, please feel free to contact us. — Kind regards, Darius, The GNU Tools Support Team
+1
May 24, 2016 Commented Hello Adam, Thank you for your input on this matter. >>There are bugs in E2Studio with regards to the archive libraries and file path includes for both toolchain versions 14.02 & 16.01 where the user has to figure out which paths to use. For a C++ project with tool chain 14.02 & -mfloat-abi=hard the following include paths are required We were able to reproduce the first portion of the problem: changing the -mfloat-abi from soft to hard (or vice-versa) did not update the linker archive directories from “${TCINSTALL}/lib/gcc/arm-none-eabi/${GCC_VERSION}/fpu/interwork” to “${TCINSTALL}/lib/gcc/arm-none-eabi/${GCC_VERSION}/fpu” for v14.02 For v16.01, you must choose the parameter recommended vfpv3, i.e "-mfpu=vfpv3". So, for the default project which is for Cortex-A9 target based on the armv7-a architecture, please change the settings in e2 studio to: Properties -> C/C++ Build -> Settings -> CPU -> Target FPU (-mfpu) to vfpv3 from drop down list This will set the library archive path to (only for v15.01 and above): "${TCINSTALL}/arm-none-eabi/lib/armv7-ar/thumb/fpu" "${TCINSTALL}/lib/gcc/arm-none-eabi/${GCC_VERSION}/armv7-ar/thumb/fpu" "${CONFIGDIR}" >>There is a bug in E2Studio where the C/C++ Build Change Toolchain Version entry disappears. We were unable to reproduce this bug after changing the paths required for -mfloat-abi=hard. For the bugs encountered using the v14.02 of the toolchain, I will raise a ticket to Renesas E2Studio development team. If you could, please send us the e2 studio log file, so we can investigate this issue more thoroughly. The file is located in the \.metadata\.log . We appreciate your interest on this task. — Best regards, Darius, The GNU Tools Support Team
+1
May 20, 2016 Commented Hello Adam, Thank you for answering. >>Firstly, can you provide a code sample showing the copy technique particularly obtaining the source and destination addresses and lengths of the section from the linker. You can modify the following sections: .text, .data from the linker script provided by E2studio as following: .mysection 0x00001000 : AT (0x0020000) { *(mysection) _section1 = . ; } .text 0x20020100 : { *(.text) _etext = .; } .data 0x30067100 : AT (( ADDR (.text) + 0x30000000 )) { _data = . ; *(.data); _edata = . ; _edata = .; } Then in your .cpp file: extern char _etext, _data, _edata, _bss, _end;//external symbols used by the linker script int my_code __attribute__((section(".mysection"))) = 3;//global variable defined to go to section mysection int main(void) { char *src = &_etext; //pointer to the .text section start address char *dst = &_data; //pounter to the .data section start address while (dst < &_edata) { *dst++ = *src++; //copy the .text section content in the .data section at the LMA } char length_bss = &_end - &_bss; // lenght of .bss section for (dst = &_bss; dst>Secondly there are many extra sections which are defined in addition to .text, .data, .bss for C++. How are these to be handled? A file that documents all the section involved is found at http://www.skyfree.org/linux/references/ELF_Format.pdf > Sections > Special Sections. >>If you want I can put a simple project together (for V14.02) which you could modify to demonstrate this? I think it would be a useful example for other users of the GNU tool chain. Yes, if you consider that this will be of more use for you, feel free to attach a project and I'll try to modify it to demonstrate. — Best regards, Darius, The GNU Tools Support Team
Support