Skip to content

Commit 04e1a53

Browse files
authored
fixes to build using GCC13 (#446)
* fixes to build using GCC13 * fix potential build error on GCC14 * use GCC 13.2 for CI * add explanation of disabling compiler forloop bounds checks
1 parent 71d67b6 commit 04e1a53

File tree

10 files changed

+31
-7
lines changed

10 files changed

+31
-7
lines changed

Diff for: .github/workflows/build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
uses: carlosperate/arm-none-eabi-gcc-action@v1
2626
id: arm-none-eabi-gcc-action
2727
with:
28-
release: 12.3.Rel1
28+
release: 13.2.Rel1
2929
- run: arm-none-eabi-gcc --version
3030

3131
- name: Create Build Environment for ILI9341

Diff for: sources/Adapters/picoTracker/main/picoTrackerMain.cpp

+10
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,16 @@
88
#include "tusb.h"
99
#include <System/Console/Trace.h>
1010

11+
// this prevents a really annoying linker warning due to newlib and >gcc13
12+
// ref:
13+
// https://github.com/raspberrypi/pico-sdk/issues/1768#issuecomment-2649260970
14+
#ifdef __cplusplus
15+
extern "C" {
16+
int _getentropy(void *buffer, size_t length) { return -1; }
17+
}
18+
#endif
19+
// ================
20+
1121
int main(int argc, char *argv[]) {
1222

1323
// Initialise microcontroller specific hardware

Diff for: sources/Application/Views/DeviceView.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ void DeviceView::ProcessButtonMask(unsigned short mask, bool pressed) {
157157
if (!pressed)
158158
return;
159159

160-
FieldView::ProcessButtonMask(mask);
160+
FieldView::ProcessButtonMask(mask, pressed);
161161

162162
if (mask & EPBM_NAV) {
163163
if (mask & EPBM_DOWN) {

Diff for: sources/Application/Views/FieldView.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ void FieldView::Redraw() {
4343
};
4444
};
4545

46-
void FieldView::ProcessButtonMask(unsigned short mask) {
46+
void FieldView::ProcessButtonMask(unsigned short mask, bool pressed) {
4747

4848
if (focus_ == 0) {
4949
focus_ = *fieldList_.begin();

Diff for: sources/Application/Views/FieldView.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class FieldView : public ScreenView {
1010
FieldView(GUIWindow &w, ViewData *viewData);
1111

1212
virtual void Redraw();
13-
virtual void ProcessButtonMask(unsigned short mask);
13+
virtual void ProcessButtonMask(unsigned short mask, bool pressed) override;
1414

1515
void SetFocus(UIField *);
1616
UIField *GetFocus();

Diff for: sources/Application/Views/InstrumentView.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,7 @@ void InstrumentView::ProcessButtonMask(unsigned short mask, bool pressed) {
682682
viewMode_ = VM_NORMAL;
683683
}
684684

685-
FieldView::ProcessButtonMask(mask);
685+
FieldView::ProcessButtonMask(mask, pressed);
686686

687687
// EDIT Modifier
688688
if (mask & EPBM_EDIT) {

Diff for: sources/Application/Views/ProjectView.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ void ProjectView::ProcessButtonMask(unsigned short mask, bool pressed) {
201201
if (!pressed)
202202
return;
203203

204-
FieldView::ProcessButtonMask(mask);
204+
FieldView::ProcessButtonMask(mask, pressed);
205205

206206
if (mask & EPBM_NAV) {
207207
if (mask & EPBM_DOWN) {

Diff for: sources/Externals/SdFat/src/common/ArduinoFiles.h

+9
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,15 @@ class PrintFile : public print_t, public BaseFile {
5353
size_t write(uint8_t b) {
5454
return BaseFile::write(&b, 1);
5555
}
56+
57+
/** Write multiple bytes.
58+
* \param[in] buffer pointer to data to be written.
59+
* \param[in] size number of bytes to write.
60+
* \return number of bytes written.
61+
*/
62+
virtual size_t write(const uint8_t* buffer, size_t size) override {
63+
return BaseFile::write(buffer, size);
64+
}
5665
};
5766
//------------------------------------------------------------------------------
5867
/**

Diff for: sources/Externals/opal/CMakeLists.txt

+5
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ add_library(opal
22
opal.h opal.cpp
33
)
44

5+
# Disable the aggressive-loop-optimizations warning that can cause build errors with GCC14
6+
# this is causeed only by the code changes in opal.cpp lines 241-247 due to code for 4-Op
7+
# which would cause out of bounds access but doesnt because 4-Op are currently disabled
8+
target_compile_options(opal PRIVATE -Wno-aggressive-loop-optimizations)
9+
510
target_link_libraries(opal
611
PUBLIC application_utils
712
PUBLIC hardware_flash

Diff for: sources/Foundation/T_Factory.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
template <class Item> class T_Factory {
1111
protected:
12-
virtual ~T_Factory<Item>(){};
12+
virtual ~T_Factory(){};
1313

1414
public:
1515
// Install the factory to use

0 commit comments

Comments
 (0)