cancel
Showing results for 
Search instead for 
Did you mean: 

Add Compiler Options; Find reason for yellow warning exclamation mark

chriskuku
Senior II

Split from  https://community.st.com/t5/stm32cubeide-mcus/warning-in-build-stm32cubeide-1-18-0-load-segment-with-rwx/td-p/788554 


Since I have a yellow exclamation mark sticking at the project icon I would like to see if it disappears when I add the CFLAG:

--no-warn-rwx-segments

in the makefile. The Debug/makefile contains a bunch of flags but misses the CFLAG which I assume to be burried in one of the includes (makefile.init, makefile.defs). Only, I cannot finde these included files. Can anyone help?

And how can I find out about the reason for the yellow exclamation mark? I was used to find this propagating downstream in the tree view attached to other files. But I don't see any "smudged" file.

10 REPLIES 10

You can add flags in the Project settings Properties here:

AndrewNeil_0-1744097796234.png

 


@chriskuku wrote:

how can I find out about the reason for the yellow exclamation mark? 


If you hover your mouse over it, it should show the warning.

Also look in the Console output window.

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

Project Settings, name it better "Project Properties" - hard to find. Rightclick on the project in the tree view.
Click on Properties. The one finds C/C++ Build.

It's not in the Preferences menu item (macOS)


@chriskuku wrote:

Project Settings, name it better "Project Properties" 


Indeed - post corrected

AndrewNeil_0-1744099991036.png

 

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

Ah, it's a linker flag. OTOH, it's passed to gcc -o . Maybe the syntax is still wrong?

arm-none-eabi-gcc: error: unrecognized command-line option '--no-warn-rwx-segments'
make[1]: *** [makefile:66: OledDrv.elf] Error 1
make: *** [makefile:59: all] Error 2
"make all" terminated with exit code 2. Build might be incomplete.

 

Maybe my toolchain is too old? Where can I update the toolchain?

Ah, yes - that figures!

AndrewNeil_0-1744100842447.png

 

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

Seems linker doesn't know of that flag. Maybe my tool chain is too old? How can I upgrade the toolchain?


@chriskuku wrote:

Seems linker doesn't know of that flag.


What makes you say that?

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

My previous post:

arm-none-eabi-gcc: error: unrecognized command-line option '--no-warn-rwx-segments'
make[1]: *** [makefile:66: OledDrv.elf] Error 1
make: *** [makefile:59: all] Error 2
"make all" terminated with exit code 2. Build might be incomplete.

and was that as a Linker option, or a Compiler option ?

To pass options to the Linker via the Compiler: https://gcc.gnu.org/onlinedocs/gcc/Link-Options.html#index-Wl

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.