Skip to content

fixes to build using GCC13 #446

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
uses: carlosperate/arm-none-eabi-gcc-action@v1
id: arm-none-eabi-gcc-action
with:
release: 12.3.Rel1
release: 13.2.Rel1
- run: arm-none-eabi-gcc --version

- name: Create Build Environment for ILI9341
Expand Down
10 changes: 10 additions & 0 deletions sources/Adapters/picoTracker/main/picoTrackerMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@
#include "pico/stdlib.h"
#include "tusb.h"

// this prevents a really annoying linker warning due to newlib and >gcc13
// ref:
// https://github.com/raspberrypi/pico-sdk/issues/1768#issuecomment-2649260970
#ifdef __cplusplus
extern "C" {
int _getentropy(void *buffer, size_t length) { return -1; }
}
#endif
// ================

int main(int argc, char *argv[]) {

// Initialise microcontroller specific hardware
Expand Down
2 changes: 1 addition & 1 deletion sources/Application/Views/DeviceView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ void DeviceView::ProcessButtonMask(unsigned short mask, bool pressed) {
if (!pressed)
return;

FieldView::ProcessButtonMask(mask);
FieldView::ProcessButtonMask(mask, pressed);

if (mask & EPBM_NAV) {
if (mask & EPBM_DOWN) {
Expand Down
2 changes: 1 addition & 1 deletion sources/Application/Views/FieldView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ void FieldView::Redraw() {
};
};

void FieldView::ProcessButtonMask(unsigned short mask) {
void FieldView::ProcessButtonMask(unsigned short mask, bool pressed) {

if (focus_ == 0) {
focus_ = *fieldList_.begin();
Expand Down
2 changes: 1 addition & 1 deletion sources/Application/Views/FieldView.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class FieldView : public ScreenView {
FieldView(GUIWindow &w, ViewData *viewData);

virtual void Redraw();
virtual void ProcessButtonMask(unsigned short mask);
virtual void ProcessButtonMask(unsigned short mask, bool pressed) override;

void SetFocus(UIField *);
UIField *GetFocus();
Expand Down
2 changes: 1 addition & 1 deletion sources/Application/Views/InstrumentView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,7 @@ void InstrumentView::ProcessButtonMask(unsigned short mask, bool pressed) {
viewMode_ = VM_NORMAL;
}

FieldView::ProcessButtonMask(mask);
FieldView::ProcessButtonMask(mask, pressed);

// EDIT Modifier
if (mask & EPBM_EDIT) {
Expand Down
2 changes: 1 addition & 1 deletion sources/Application/Views/ProjectView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ void ProjectView::ProcessButtonMask(unsigned short mask, bool pressed) {
if (!pressed)
return;

FieldView::ProcessButtonMask(mask);
FieldView::ProcessButtonMask(mask, pressed);

if (mask & EPBM_NAV) {
if (mask & EPBM_DOWN) {
Expand Down
9 changes: 9 additions & 0 deletions sources/Externals/SdFat/src/common/ArduinoFiles.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,15 @@ class PrintFile : public print_t, public BaseFile {
size_t write(uint8_t b) {
return BaseFile::write(&b, 1);
}

/** Write multiple bytes.
* \param[in] buffer pointer to data to be written.
* \param[in] size number of bytes to write.
* \return number of bytes written.
*/
virtual size_t write(const uint8_t* buffer, size_t size) override {
return BaseFile::write(buffer, size);
}
};
//------------------------------------------------------------------------------
/**
Expand Down
5 changes: 5 additions & 0 deletions sources/Externals/opal/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ add_library(opal
opal.h opal.cpp
)

# Disable the aggressive-loop-optimizations warning that can cause build errors with GCC14
# this is causeed only by the code changes in opal.cpp lines 241-247 due to code for 4-Op
# which would cause out of bounds access but doesnt because 4-Op are currently disabled
target_compile_options(opal PRIVATE -Wno-aggressive-loop-optimizations)

target_link_libraries(opal
PUBLIC application_utils
PUBLIC hardware_flash
Expand Down
2 changes: 1 addition & 1 deletion sources/Foundation/T_Factory.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

template <class Item> class T_Factory {
protected:
virtual ~T_Factory<Item>(){};
virtual ~T_Factory(){};

public:
// Install the factory to use
Expand Down