greenhills

Greenhills link script to Gcc link script porting for ARM target

时光总嘲笑我的痴心妄想 提交于 2021-01-29 11:51:31
问题 I have one application was compiled with Greenhills compiler before, I am trying to use arm-Gcc compiler to compile it, when I try to link the objects with link script (.LD), I got syntax error. I know the link command are different in Greenhills and arm-Gcc, I am trying to find the equivalent ones in Gcc but failed now. I list my Greenhills LD file below and what I tired to change for GCC. Any comments and suggestions are appreciated. Thanks GHS ld file : MEMORY { INIT_SRAM : ORIGIN =

(error) read-only small data overflow in GHS compiler

冷暖自知 提交于 2020-01-14 14:51:07
问题 I'm using GHS compiler. I get this error message when trying to build my project. Click to see: elxr Linker error [elxr] (error) read-only small data overflow: (signed) didn't fit in 16 bits while performing relocation. Update: The output of MULTI IDE after adding # and -v [elxr] (warning) section .NOINIT_RAM_UNSPECIFIED from Port_Ram.o isn't included by the section map; appending after last section. add to section map or use -append to append without warning [elxr] (warning) section .PORT

GHS C++: extra semicolon diagnostic message - purpose?

蹲街弑〆低调 提交于 2019-12-13 07:37:24
问题 In the GHS compiler, if you have multiple semicolons in a row without any intervening statements, this generates a diagnostic message (warning). For example: void myfunc() { }; // warning #381-D: extra ';' ignored. This doesn't seem like a very common situation, but this warning is also issued after preprocessing has occurred, such that, the following would also generate the warning (when compiled in release): #if _DEBUG #define DEBUG_VAR(x) x #else #define DEBUG_VAR(x) #endif void myfunc() {

How to use global variable in Inline Assembly in Greenhills Compiler?

徘徊边缘 提交于 2019-12-13 04:58:39
问题 I want to use a global variable in inline assembly. asm(" LDR R0,g_TsInitStackPointerAddress"); Here g_TsInitStackPointerAddress is a global variable. While compiling its not showing any error . But while linking it shows the following error [elxr] (error) out of range: 0x1001326 (unsigned) didn't fit in 12 bits while performing relocation type R_ARM_POOL (4) at address 0x10013e0 from InitStack+0x20 (drv.o(.text)+0x1a4), to g_TsInitStackPointerAddress+0x0 ((COMMON)+0xb6) Here My function name

greenhills compiler turn off optimization for file or part of

别来无恙 提交于 2019-12-12 03:04:56
问题 I found several code snippets for disabling GCC optimization for dedicated code parts. with pragma GCC optimize(0) But I could not found something like that for Greenhils compiler. Is there no such option? 回答1: From the manual: #pragma ghs Ostring Turns on optimizations. The optional string may contain any or all of the following letters: L — Loop optimizations M — Memory optimizations S — Small (but Slow) optimizations #pragma ghs ZO Disables all optimizations, starting from the next

GreenHills - small data area overflow

徘徊边缘 提交于 2019-11-29 15:05:47
I'm hoping maybe someone has a quick answer for this but essentially when I turn on optimizations, I get the following error: [elxr] (error) small data area overflow: 0xfff9f6fc (signed) didn't fit in 16 bits while performing relocation in file test_main.o at location __sti___13_test_main_cpp_252229d3+0xc, to reference symbol oe_init_intconn A similar error occurs when I put in this linker directive as well: -auto_sda Their manual doesn't make any mention of this linker error. I'm using Integrity 5.10 This linker error is usually not related to the -Olink optimization -auto_sda . The linker

Multiply defined linker error using inlined functions

蹲街弑〆低调 提交于 2019-11-29 12:47:06
The linker is reporting multiply defined errors for an inline function. I have the following code in a header file: struct Port_Pin { volatile uint32_t * port_addr_set_value; //!< Writing the pin value here sets the pin to high. volatile uint32_t * port_addr_clr_value; //!< Writing the pin value to this port clears the pin to low. volatile uint32_t * port_addr_read_value; //!< Address to read pin value. volatile uint32_t * port_addr_enable; //!< Writing the pin value here enables the pin (for reading or writing). volatile uint32_t * port_addr_disable; //!< Writing the pin value here disables

GreenHills - small data area overflow

爷,独闯天下 提交于 2019-11-28 08:56:09
问题 I'm hoping maybe someone has a quick answer for this but essentially when I turn on optimizations, I get the following error: [elxr] (error) small data area overflow: 0xfff9f6fc (signed) didn't fit in 16 bits while performing relocation in file test_main.o at location __sti___13_test_main_cpp_252229d3+0xc, to reference symbol oe_init_intconn A similar error occurs when I put in this linker directive as well: -auto_sda Their manual doesn't make any mention of this linker error. I'm using

Multiply defined linker error using inlined functions

假如想象 提交于 2019-11-28 06:07:44
问题 The linker is reporting multiply defined errors for an inline function. I have the following code in a header file: struct Port_Pin { volatile uint32_t * port_addr_set_value; //!< Writing the pin value here sets the pin to high. volatile uint32_t * port_addr_clr_value; //!< Writing the pin value to this port clears the pin to low. volatile uint32_t * port_addr_read_value; //!< Address to read pin value. volatile uint32_t * port_addr_enable; //!< Writing the pin value here enables the pin (for