Skip to content
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

ATmega128 support #30

Merged
merged 5 commits into from
Oct 25, 2024
Merged

ATmega128 support #30

merged 5 commits into from
Oct 25, 2024

Conversation

nathancheek
Copy link
Contributor

@nathancheek nathancheek commented Aug 24, 2024

These changes enable the ATmega128 design to compile and successfully run a basic blink deployment (with F Prime GDS commanding and telemetry). This builds off the ranlib update in PR #29.

There are 4 main changes:

  • TimerOne library updated with latest patches, AVR builds made to point to the local patched TimerOne library instead of the upstream unpatched version (which doesn't support ATmega128), and now-unnecessary TimerOne-related compiler flags removed
  • Addition of compiler flags which optimize for flash size
  • New ARDUINO_BOARD_OPTIONS cmake variable which works with the arduino-cli-cmake-wrapper to pass --board-options to arduino-cli (necessary in this case for specifying the clockspeed)
  • New ARDUINO_LINKER_FLAGS cmake variable which allows for custom linker flags (necessary in this case for telling the linker to place .data, .bss, and the heap in external SRAM, leaving internal SRAM dedicated to the stack [0])

[0] https://www.nongnu.org/avr-libc/user-manual/malloc.html#malloc_tunables

@LeStarch
Copy link
Contributor

Has more work been done since this PR, or should I review this one?

@LeStarch LeStarch merged commit 1543c40 into fprime-community:main Oct 25, 2024
@nathancheek
Copy link
Contributor Author

nathancheek commented Oct 25, 2024

No more work had been done, thanks for reviewing and merging. We have an ATmega128 blink reference deployment (with fprime-gds support) working off of the changes you just merged. I will try to make that deployment public soon.

@ethancheez
Copy link
Collaborator

ethancheez commented Oct 26, 2024

@nathancheek
I just realized, there is no release of your refactor-build-properties work correct? I had to do a manual install of the arduino-cli-cmake-wrapper via the GitHub repo instead of through pip.

Otherwise, I get an error when generating:

usage: arduino-cli-wrapper [-h] [--debug] -b BOARD [-d] [-g] [-i]
                           [-l [LIBRARIES ...]] [-c [COPY ...]]
                           [--properties [PROPERTIES ...]] [-p] -o OUTPUT
                           [-j JSON_FILE]
arduino-cli-wrapper: error: unrecognized arguments: --board-options

The --board-options flag is not implemented in the pip release (v0.1.0).

@nathancheek
Copy link
Contributor Author

Ah you are correct. @SterlingPeet can we get those changes to arduino-cli-cmake-wrapper merged into main with a new release that can be installed via pip?

@SterlingPeet
Copy link
Contributor

This is on my todo list, should percolate up to the top in the next two weeks. Just cleaning up some release-support stuff. @ethancheez you can install the refactor-tooling-cleanup branch for the latest changes that are due for release.

@LeStarch
Copy link
Contributor

@SterlingPeet I am going to do a release of the tool on PIP from the above branch, just so we have published something that works. When finished with merging to main, let me know and I can release again.

@SterlingPeet
Copy link
Contributor

@LeStarch That seems fine, just publish it as a patch or alpha release so we don't confuse the version numbering.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants