Skip to content
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
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "base_hardware_module.h"
#include <cstring>

using namespace daisy;
using namespace bkshepherd;
Expand Down Expand Up @@ -203,6 +204,10 @@ void BaseHardwareModule::InitEncoders(int count, Pin pins[][3]) {
void BaseHardwareModule::InitLeds(int count, Pin pins[]) {
for (int i = 0; i < count; i++) {
Led newLed;
// libDaisy's Led::Init() never initialises the software-PWM phase (pwm_), and Led's constructor does nothing, so a stack-allocated
// Led starts with whatever was left on the stack. Depending on the compiler/optimiser that can be a huge or NaN value, which keeps
// the LED permanently off (or on). Zero the whole object first so the PWM phase starts at 0.
std::memset(static_cast<void *>(&newLed), 0, sizeof(newLed));
newLed.Init(pins[i], false, AudioCallbackRate());
leds.push_back(newLed);
}
Expand Down
21 changes: 0 additions & 21 deletions Software/GuitarPedal/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -147,24 +147,3 @@ ifdef VARIANT
CFLAGS += -DVARIANT_$(VARIANT)
$(info VARIANT=$(VARIANT))
endif


# --- ARM SDK Version check --- [start]
# Issues have been experienced with the latest version of arm-none-eabi-gcc, so
# we add a check here to help guide users to use a supported version

# Determine which compiler to check (use GCC_PATH if set, otherwise system default)
GCC_CHECK := arm-none-eabi-gcc
ifdef GCC_PATH
GCC_CHECK := $(GCC_PATH)/arm-none-eabi-gcc
endif

# Get compiler version string safely
GCC_VERSION := $(shell $(GCC_CHECK) -dumpversion)
GCC_VERSION_MAJOR := $(word 1, $(subst ., ,$(GCC_VERSION)))
GCC_VERSION_MAJOR_REQUIRED := 10

ifneq ($(GCC_VERSION_MAJOR),$(GCC_VERSION_MAJOR_REQUIRED))
$(error Compiler version of arm-none-eabi-gcc: $(GCC_VERSION) is not supported. Use version $(GCC_VERSION_MAJOR_REQUIRED).x.x)
endif
# --- ARM SDK Version check --- [end]
7 changes: 3 additions & 4 deletions Software/GuitarPedal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@ Before you can use the software you'll need to do the following steps. There is

The code in this project is supplied with a Microsoft Visual Code project and depends on both **LibDaisy** and **DaisySP** from Electro-Smith. Detailed instructions on setting these up for your dev environment can be found here:

https://electro-smith.github.io/libDaisy/index.html
https://docs.daisy.audio/tutorials/cpp-dev-env/

Some issues have been reported with newer ARM compiler versions. The documentation above from Electrosmith should be complete but for reference many users have had success with `10.3-2021.10`

Version can be checked with `arm-none-eabi-gcc --version`
Note: previously gcc 10 compiler was enforced by build system, the reasons for this should no longer be valid and the
compiler recommended by daisy.audio should work fine.

### 2. Setup dependencies

Expand Down
Loading