benirose / O_C-BenisphereSuite

Benisphere Suite is a continuation of Hemisphere Suite, an alternate firmware for Ornament and Crime, featuring a dual-applet framework with dozens of different modular functions.
168 stars 17 forks source link

Basic PlatformIO build config #59

Closed djphazer closed 1 year ago

djphazer commented 1 year ago

I've staged this patch (per @recliq #54 ) for convenient testing and cherry-picking for other forks. It is enough to get the branch to build with Platform IO. It works via PIO inside VSCode, as well as with the PlatformIO CLI on my Raspberry Pi.

The built binary size is greatly reduced:

RAM:   [=======   ]  73.4% (used 48100 bytes from 65536 bytes)
Flash: [=======   ]  67.8% (used 177816 bytes from 262144 bytes)

Maybe teensy@1.6.0 within PIO has less overhead or something? It also builds with teensy@3.7.1 but yields a binary size similar to what we're used to. -DTEENSY_OPT_SMALLEST_CODE yields a smaller binary... but at what expense? Trying with teensy@4.0+ gives me stupid errors.

Anyway, I've been actively using this build config and haven't encountered any major runtime issues yet... I even re-enabled all the MIDI stuff and it still fits! Needs more testing for sure...

yratof commented 1 year ago

Following this up — cloning a fresh repo and running this fails — did you have to set anything to stop the code from complaining about brackets everywhere? @djphazer

djphazer commented 1 year ago

Sometimes a missing semicolon or something silly can cause a lot of confusing compiler errors... what is the very first error it complains about?

Are you saying you're trying to build from source with a clean clone of this repo? Or are you trying to apply this patch to a different branch?

yratof commented 1 year ago

Clean clone, installed PIO in VSCode and ran the o_c prod. complains about every midi HEM file and more