Replies: 2 comments 1 reply
-
Hi @bbc25185 Default config::
With your
Warning message:
That is normal as the default Serial for the GenericG070KBTx is the Serial4. So as you define it again in the build_opt.h.... |
Beta Was this translation helpful? Give feedback.
0 replies
-
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the bug
After testing, I noticed that the Build_opt.h file is used only if, as a compilation optimization, one with LTO is chosen.
To Reproduce
The Build_opt.h file contains the following code:
-DSERIAL_RX_BUFFER_SIZE=512 -DSERIAL_TX_BUFFER_SIZE=512
-DMAVLINK_COMM_NUM_BUFFERS=4
-DPIN_SERIAL1_RX=PB7 -DPIN_SERIAL1_TX=PB6
-DENABLE_HWSERIAL1
-DPIN_SERIAL2_RX=PA3 -DPIN_SERIAL2_TX=PA2
-DENABLE_HWSERIAL2
-DPIN_SERIAL3_RX=PB9 -DPIN_SERIAL3_TX=PB8
-DENABLE_HWSERIAL3
-DPIN_SERIAL4_RX=PA1 -DPIN_SERIAL4_TX=PA0
-DENABLE_HWSERIAL4
Steps to reproduce the behavior:
Selected Board: STM32G0 Series
Board Part Number: Generic G070KBTx
Usart Support: Enabled (No generic Serial)
Compiled with Optimize - Smallest: No error and Ram usage dont change with Buffer size change
Compiled with Optimize - Smallest with LTO: Various error reporting "note: 'SerialX' was previously declared here" and Buffer Size changing with Buffer Size setting.
Expected behavior
The file Build_opt.h always working
Desktop (please complete the following information):
Board (please complete the following information):
Additional context
To solve the problem, I normally compiled with LTO but due to errors that appeared when I started implementing FreeRtos.
Without LTO the options in the Build_opt.h file are not applied for my project.
Beta Was this translation helpful? Give feedback.
All reactions