Getting error messages in arduino when trying to upload soundfonts

I just got a new sabertrio proffie V3 bluetooth powercore whatever and i am trying to add some sounds from a different source like ive learned before and know how to do. But now i am getting some errors and am lost. It really shouldnt be this difficult to add some sounds or replace them and then uploading it in arduino so i can use my saber to its full potential like my older proffie core. if someone can help me out and fix this that would be greatly appreciated.

Please post your config file, and the errors you are seeing.
(here is how: Recommended way to post a config file)

s3config_v3.h (50.5 KB)
here is the config file im using and like sabertrios site is the recommended one to use for my core.

and here is the error messages im getting which seem to possbily also effect the prop_base

Arduino: 1.8.18 (Windows 10), Board: "Proffieboard V3, Serial + Mass Storage, SDCARD (SDIO High Speed), 80 MHz, Smallest Code"

In file included from D:\extra\ProffieOS\ProffieOS.ino:628:

D:\extra\ProffieOS\config\s3config_v3.h:369:13: error: expected primary-expression before 'blades'

  369 | BladeConfig blades[] = {

      |             ^~~~~~

D:\extra\ProffieOS\config\s3config_v3.h:369:13: error: expected '}' before 'blades'

In file included from D:\extra\ProffieOS\ProffieOS.ino:628:

D:\extra\ProffieOS\config\s3config_v3.h:51:18: note: to match this '{'

   51 | Preset blade[] = {

      |                  ^

In file included from D:\extra\ProffieOS\ProffieOS.ino:247:

D:\extra\ProffieOS\props\prop_base.h: In member function 'size_t PropBase::FindBestConfig()':

D:\extra\ProffieOS\props\prop_base.h:567:25: error: 'blades' was not declared in this scope; did you mean 'blade'?

  567 |     static_assert(NELEM(blades) > 0, "blades array cannot be empty");

      |                         ^~~~~~

D:\extra\ProffieOS\common\common.h:18:26: note: in definition of macro 'NELEM'

   18 | #define NELEM(X) (sizeof(X)/sizeof((X)[0]))

      |                          ^

In file included from D:\extra\ProffieOS\props\saber_sabertrio_buttons.h:223,

                 from D:\extra\ProffieOS\config\s3config_v3.h:45,

                 from D:\extra\ProffieOS\ProffieOS.ino:632:

D:\extra\ProffieOS\props\prop_base.h: In member function 'void PropBase::FindBlade()':

D:\extra\ProffieOS\props\prop_base.h:622:22: error: 'blades' was not declared in this scope; did you mean 'blade'?

  622 |     current_config = blades + best_config;

      |                      ^~~~~~

      |                      blade

exit status 1

Error compiling for board Proffieboard V3.



This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

You are missing “};” before line 369 (add it on line 368)

FYI: to correct method to post error messages is to use 3 back ticks before & after, like this:

```
your error code (or your config) here
```

ill try that but im not sure since im newer for the black ticks but i kinda see what your saying. what about the other errors do you know what i should do since im not too fimiliar with the code or why its saying these to a degree.

just fix the “};”
the other errors are just a snowball effect from the missing “};”

1 Like

ok so that }; fixed the main 2 erros but im still getting these last few and ill type them out here.

In file included from D:\extra\ProffieOS\ProffieOS.ino:247:

D:\extra\ProffieOS\common\common.h:18:27: error: invalid application of 'sizeof' to incomplete type 'BladeConfig []'

   18 | #define NELEM(X) (sizeof(X)/sizeof((X)[0]))

      |                           ^

D:\extra\ProffieOS\common\preset.h:6:27: note: in expansion of macro 'NELEM'

    6 | #define CONFIGARRAY(X) X, NELEM(X)

      |                           ^~~~~

D:\extra\ProffieOS\config\s3config_v3.h:372:7: note: in expansion of macro 'CONFIGARRAY'

  372 |       CONFIGARRAY(blades) },

      |       ^~~~~~~~~~~

exit status 1

Error compiling for board Proffieboard V3.

This mean you have another error in you new config. Post the new one and I’ll take a look.

s3config_v3.h (50.5 KB)
preset.h (2.4 KB)

heres the files its showing the errors from atleast from what i can see.

common.h (829 Bytes)

this is not necessary, the error in your config causes snowball errors in all ProffieOS standard files because those ProffieOS files expect your config to be error free.

also not necessary (same reason)

The problem comes from this: you have 2 blades but only one blade style per preset ( a preset is font name, track name and location, blade style(s), ).

these are your blades (scroll right for details):

BladeConfig blades[] = {
  { 0, WS281XBladePtr<144, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(), // <-- this is you main blade
       WS281XBladePtr<1, blade2Pin, Color8::GRB, PowerPINS<bladePowerPin1> >(), // <-- this is a "secondary blade". A blade in ProffieOS is anything that lights up or rotate (like a motor)
      CONFIGARRAY(blades) },
};

Here is what you need in your presets section:

{ "19-APOCALYPSE;common", "tracks/track_18.wav", // "font name;common", "track name & location" You already have that correct
StylePtr<Layers< // rest of the main blade code.  You already have that correct
>(), // main blade style code
StylePtr< // code for your 1 pixel led.
>(), // secondary blade style code. This is missing and causing the errors
},

As a simple fix, you can add:
StylePtr<Blue>(), for your second blade style and see what lights up blue.

ill definitely try that, do you think it may be because the sabertio that i have uses the bladestyles color in the button as well im assuming since it is for the 1 pixel LED? this is just theory but it helps me understand a little more and ill definitely give this a go.

100% yes. A button LED is also “a blade” and it needs its style.

how do you suppose i could setup a style that matches my sound fonts or should i just do a base color and a easy and simple style?

ok so i added the option sabertrio has for their sounds and for the 1 pixel LED extra bladestyle and added it to a singular sound i wanted to add. No new errors but im still getting the same 3 now even though i added the extra bladestyle option for the button LED. i feel like it shouldnt be this complicated of an error haha. (im dying inside)

For that, I am not your guy, sorry my style knowledge is very limited, but these are the tools:
You can try Fett263’s library to create your own or the style editor:
https://www.fett263.com/fett263-proffieOS7-style-library.html

Didn’t see this earlier, you probably posted while I was typing my previous reply.
Post your newest config and the error code that newest config generated.

FYI if you are in a rush to fix a config, you can always ask ChatGPT. Just post your error code to it. Config errors are quite predictable and it usually can solve if faster than a human can. Just don’t ask it to make code for you (and never post non-working ChatGPT code on The Crucible, it is against the forum rules)

This is what is happening now that ive been trying to figure stuff out too which is ridiculous.


c:/users/badarnget/appdata/local/arduino15/packages/proffieboard/tools/arm-none-eabi-gcc/9-2020-q2-update/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld.exe:C:\Users\Badarnget\AppData\Local\Arduino15\packages\proffieboard\hardware\stm32l4\3.6\variants\STM32L452RE-ProffieboardV3/linker_scripts/STM32L452RE_FLASH.ld:224: warning: memory region `SRAM2' not declared

c:/users/badarnget/appdata/local/arduino15/packages/proffieboard/tools/arm-none-eabi-gcc/9-2020-q2-update/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld.exe: warning: changing start of section .bss by 16 bytes

c:/users/badarnget/appdata/local/arduino15/packages/proffieboard/tools/arm-none-eabi-gcc/9-2020-q2-update/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld.exe: warning: changing start of section .bss by 16 bytes

c:/users/badarnget/appdata/local/arduino15/packages/proffieboard/tools/arm-none-eabi-gcc/9-2020-q2-update/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld.exe: warning: changing start of section .bss by 16 bytes

c:/users/badarnget/appdata/local/arduino15/packages/proffieboard/tools/arm-none-eabi-gcc/9-2020-q2-update/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld.exe: warning: changing start of section .bss by 16 bytes

c:/users/badarnget/appdata/local/arduino15/packages/proffieboard/tools/arm-none-eabi-gcc/9-2020-q2-update/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld.exe: warning: changing start of section .bss by 16 bytes

Sketch uses 234128 bytes (46%) of program storage space. Maximum is 507904 bytes.

An error occurred while uploading the sketch

The current directory is invalid.



This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Where is your ProffieOS folder? It’s safest to just make sure it’s on your main drive.

when i take the usb and put it in my computer its in those files. do i need to remove it? it came like that and so i thought thats just how it worked.