Skip to content

[Feature Request] Allow E2END to be set as compile time option #776

@noisymime

Description

@noisymime

Currently the only way to adjust the available EEPROM size is to directly edit the core eeprom.h file directly. This makes sharing code that needs to adjust this difficult as it requires people manually changing their library files as well as needing to keep the modification when updated versions of Teensyduino are released.

Being able to adjust this as a compile option and make this configurable at a project level would make it MUCH easier to achieve this.

The change required to allow this is fairly trivial. Within the avr/eeprom.h file for any given core, the existing #defines for E2END simply need to be wrapped within an #ifndef block. Eg for Teensy 4:

#ifndef E2END
    #if defined(ARDUINO_TEENSY40)
        #define E2END 0x437
    #elif defined(ARDUINO_TEENSY41)
        #define E2END 0x10BB
    #elif defined(ARDUINO_TEENSY_MICROMOD)
        #define E2END 0x10BB
    #endif
#endif

The E2END value can then be set at compile time with something like -DE2END=0x2176 as a build flag.

I have tested the above on Teensy 4 and it works perfectly and is considerably simpler than having to get people to modify the core files directly.

Is this something that would ever be considered for inclusion?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions