You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "extinguish (via GitHub)" <gi...@apache.org> on 2024/08/11 08:22:56 UTC
[PR] greenhills support: add Kconfig, makefile, make.defs support for ghs compiler [nuttx]
extinguish opened a new pull request, #12884:
URL: https://github.com/apache/nuttx/pull/12884
## Summary
1. add Kconfig, makefile, make.defs, toolchain.defs support for ghs compiler
2. update .gitignore rule to exclude ghs compile intermediate file out
## Impact
## Testing
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] greenhills support: add Kconfig, makefile, make.defs support for ghs compiler [nuttx]
Posted by "extinguish (via GitHub)" <gi...@apache.org>.
extinguish commented on code in PR #12884:
URL: https://github.com/apache/nuttx/pull/12884#discussion_r1726723824
##########
arch/arm/src/Makefile:
##########
@@ -133,7 +133,7 @@ else
endif
ARCHSCRIPT := $(call CONVERT_PATH,$(ARCHSCRIPT))
-LDFLAGS += $(addprefix $(SCRIPT_OPT),$(addsuffix .tmp,$(ARCHSCRIPT))) $(EXTRALINKCMDS)
+LDFLAGS += $(addprefix $(SCRIPT_OPT) ,$(addsuffix .tmp,$(ARCHSCRIPT))) $(EXTRALINKCMDS)
Review Comment:
> why change
this is using to support "[support inputting multiple ldscript files when linking the nuttx.bin](https://github.com/apache/nuttx/pull/12884/commits/85ce364d4c60a9fd0729564b807788e7c199d8fc)"
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] greenhills support: add Kconfig, makefile, make.defs support for ghs compiler [nuttx]
Posted by "anchao (via GitHub)" <gi...@apache.org>.
anchao commented on code in PR #12884:
URL: https://github.com/apache/nuttx/pull/12884#discussion_r1713093078
##########
arch/arm/src/common/Toolchain.defs:
##########
@@ -292,8 +320,13 @@ endif
# Architecture flags
-ARCHCFLAGS += -Wstrict-prototypes -Wno-attributes -Wno-unknown-pragmas
-ARCHCXXFLAGS += -Wno-attributes -Wno-unknown-pragmas
+ifeq ($(CONFIG_ARM_TOOLCHAIN_GHS),y)
+ ARCHCFLAGS += -gcc -gnu99 -preprocess_assembly_files --diag_suppress=68,111,174,222,236,257,826,1143,1721
+ ARCHCXXFLAGS += --gnu_asm --diag_suppress=540,826
Review Comment:
Add some comments to describe the meaning of diag_suppress numbers, you could refer:
https://github.com/apache/nuttx/blob/master/arch/tricore/src/common/ToolchainTasking.defs#L107-L125
##########
arch/arm/src/common/Toolchain.defs:
##########
@@ -47,7 +47,11 @@ endif
ifeq ($(CONFIG_FRAME_POINTER),y)
ARCHOPTIMIZATION += -fno-omit-frame-pointer -fno-optimize-sibling-calls
else
- ARCHOPTIMIZATION += -fomit-frame-pointer
+ ifeq ($(CONFIG_ARM_TOOLCHAIN_GHS),y)
+ ARCHOPTIMIZATION += -noga
Review Comment:
Seriously I don't like adding too many special compiler assertions to the common toolchain. For tricore architecture, GNUC/TASKING is separated into two files, because most of the compilation options are completely different:
https://github.com/apache/nuttx/blob/master/arch/tricore/src/common/ToolchainTasking.defs
https://github.com/apache/nuttx/blob/master/arch/tricore/src/common/ToolchainGnuc.defs
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] greenhills support: add Kconfig, makefile, make.defs support for ghs compiler [nuttx]
Posted by "extinguish (via GitHub)" <gi...@apache.org>.
extinguish commented on PR #12884:
URL: https://github.com/apache/nuttx/pull/12884#issuecomment-2308630506
@xiaoxiang781216 @anchao all comments are fixed, please help to take a review on this commit, very grateful thanks ^_^
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] greenhills support: add Kconfig, makefile, make.defs support for ghs compiler [nuttx]
Posted by "extinguish (via GitHub)" <gi...@apache.org>.
extinguish commented on code in PR #12884:
URL: https://github.com/apache/nuttx/pull/12884#discussion_r1721166173
##########
arch/arm/src/common/Toolchain.defs:
##########
@@ -47,7 +47,11 @@ endif
ifeq ($(CONFIG_FRAME_POINTER),y)
ARCHOPTIMIZATION += -fno-omit-frame-pointer -fno-optimize-sibling-calls
else
- ARCHOPTIMIZATION += -fomit-frame-pointer
+ ifeq ($(CONFIG_ARM_TOOLCHAIN_GHS),y)
+ ARCHOPTIMIZATION += -noga
Review Comment:
> Seriously I don't like adding too many special compiler assertions to the common toolchain. For tricore architecture, GNUC/TASKING is separated into two files, because most of the compilation options are completely different: https://github.com/apache/nuttx/blob/master/arch/tricore/src/common/ToolchainTasking.defs https://github.com/apache/nuttx/blob/master/arch/tricore/src/common/ToolchainGnuc.defs
Ok, I'm still working on it, and will split the toolchain specific implementation do isolate files
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] greenhills support: add Kconfig, makefile, make.defs support for ghs compiler [nuttx]
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #12884:
URL: https://github.com/apache/nuttx/pull/12884#discussion_r1730378356
##########
arch/arm/src/armv7-m/Toolchain.defs:
##########
@@ -30,27 +30,6 @@ ifeq ($(CONFIG_ARCH_CORTEXM4),y)
endif
else ifeq ($(CONFIG_ARCH_CORTEXM7),y)
TOOLCHAIN_ARM7EM := y
- ifeq ($(CONFIG_ARM_TOOLCHAIN_GHS),y)
Review Comment:
what's the rule to split Toolchain.def? All arm arch has ToolchainArmclang.defs etc, or each arch(e.g. armv7-m) has ToolchainArmclang.defs? we need make a decision before making this big change, @anchao . So, I suggest moving the refactor to new pr.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] greenhills support: add Kconfig, makefile, make.defs support for ghs compiler [nuttx]
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 merged PR #12884:
URL: https://github.com/apache/nuttx/pull/12884
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] greenhills support: add Kconfig, makefile, make.defs support for ghs compiler [nuttx]
Posted by "extinguish (via GitHub)" <gi...@apache.org>.
extinguish commented on code in PR #12884:
URL: https://github.com/apache/nuttx/pull/12884#discussion_r1721166173
##########
arch/arm/src/common/Toolchain.defs:
##########
@@ -47,7 +47,11 @@ endif
ifeq ($(CONFIG_FRAME_POINTER),y)
ARCHOPTIMIZATION += -fno-omit-frame-pointer -fno-optimize-sibling-calls
else
- ARCHOPTIMIZATION += -fomit-frame-pointer
+ ifeq ($(CONFIG_ARM_TOOLCHAIN_GHS),y)
+ ARCHOPTIMIZATION += -noga
Review Comment:
> Seriously I don't like adding too many special compiler assertions to the common toolchain. For tricore architecture, GNUC/TASKING is separated into two files, because most of the compilation options are completely different: https://github.com/apache/nuttx/blob/master/arch/tricore/src/common/ToolchainTasking.defs https://github.com/apache/nuttx/blob/master/arch/tricore/src/common/ToolchainGnuc.defs
Ok, I'm still working on it, and will split the toolchain specific implementation do isolate files
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] greenhills support: add Kconfig, makefile, make.defs support for ghs compiler [nuttx]
Posted by "extinguish (via GitHub)" <gi...@apache.org>.
extinguish commented on code in PR #12884:
URL: https://github.com/apache/nuttx/pull/12884#discussion_r1730936335
##########
arch/arm/src/armv7-m/Toolchain.defs:
##########
@@ -30,27 +30,6 @@ ifeq ($(CONFIG_ARCH_CORTEXM4),y)
endif
else ifeq ($(CONFIG_ARCH_CORTEXM7),y)
TOOLCHAIN_ARM7EM := y
- ifeq ($(CONFIG_ARM_TOOLCHAIN_GHS),y)
Review Comment:
> what's the rule to split Toolchain.def? All arm arch has ToolchainArmclang.defs etc, or each arch(e.g. armv7-m) has ToolchainArmclang.defs? we need make a decision before making this big change, @anchao . So, I suggest moving the refactor to new pr.
Ok, the refactor patch will be pushed in a new pull request after current request is merged, and the new pull request will be based on current pull request
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] greenhills support: add Kconfig, makefile, make.defs support for ghs compiler [nuttx]
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #12884:
URL: https://github.com/apache/nuttx/pull/12884#discussion_r1726584707
##########
arch/arm/src/Makefile:
##########
@@ -133,7 +133,7 @@ else
endif
ARCHSCRIPT := $(call CONVERT_PATH,$(ARCHSCRIPT))
-LDFLAGS += $(addprefix $(SCRIPT_OPT),$(addsuffix .tmp,$(ARCHSCRIPT))) $(EXTRALINKCMDS)
+LDFLAGS += $(addprefix $(SCRIPT_OPT) ,$(addsuffix .tmp,$(ARCHSCRIPT))) $(EXTRALINKCMDS)
Review Comment:
why change
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] greenhills support: add Kconfig, makefile, make.defs support for ghs compiler [nuttx]
Posted by "anchao (via GitHub)" <gi...@apache.org>.
anchao commented on code in PR #12884:
URL: https://github.com/apache/nuttx/pull/12884#discussion_r1713130954
##########
tools/incdir.c:
##########
@@ -352,7 +358,8 @@ int main(int argc, char **argv, char **envp)
wintool = true;
#endif
}
- else if (compiler == COMPILER_SDCC || compiler == COMPILER_TASKING)
+ else if (compiler == COMPILER_SDCC || compiler == COMPILER_TASKING
+ || compiler == COMPILER_GHS)
Review Comment:
```suggestion
else if (compiler == COMPILER_SDCC || compiler == COMPILER_TASKING ||
compiler == COMPILER_GHS)
```
##########
arch/arm/src/Makefile:
##########
@@ -133,7 +133,7 @@ else
endif
ARCHSCRIPT := $(call CONVERT_PATH,$(ARCHSCRIPT))
-LDFLAGS += $(addprefix $(SCRIPT_OPT),$(addsuffix .tmp,$(ARCHSCRIPT))) $(EXTRALINKCMDS)
+LDFLAGS += $(SCRIPT_OPT) $(addsuffix .tmp,$(ARCHSCRIPT)) $(EXTRALINKCMDS)
Review Comment:
Why remove multiple LD linker script support?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org