Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The currently available jg aurora firmware (https://firmware.jgmakerwiki.com/) is a little outdated.
So I tried to update my printer to the latest marlinfw but I immediately ran into problems.
I got a hard fault exception on application startup and it took me many hours of bootloader reversing before I found out that the bootloader SysTick interrupt was firing during application run. This causes two major issues: 1) In the non-maple build on of the first RAM locations store GPIO bases addresses and those get incremented by the bootloader interrupt. 2) The bootloader stores 3 function poiners in RAM and calls them periodically from the SysTick interrupt. When this happens after datainit or .bsszero, the bootloader attempts to execute an invalid instruction and this leads to the hard fault exception.
The fix is to disable the SysTick interrupt before memory initialization.
I also found two other minor improvements to achive a working printer with equal functionality as with the old firmware.
Requirements
jg aurora a1
Benefits
Fix hard fault exception on startup.
Fix GPIOA base reference in RAM (allows normal control of heaters and fan).
Compile without USB support, since this printer does not use the STM32 USB port.
Enable with FLASH_EEPROM_EMULATION, in order to allow operation without a SD card inserted.
Configurations
jg aurora a1
Related Issues
N/A