Add support for Nucleo-L4R5ZI board #193
Merged
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.
This adds support for Nucleo-L4R5ZI board, a fairly large (in terms of 640KB of SRAM) Cortex-M4 based board. This also includes a memory timing test (used to determine the memory timings of the board), and a small fix for the
bikel{1,3}
source (they checked forSTM32F4
definition, which isn't defined for this or any other non STM32F4 board).Maybe one point that needs discussion is the memory layout of the board. The board has three SRAMs, all in one continuous address space:
The memory timing test showed that the first SRAM1 block has slightly faster load timings. This is a similar situation as with the STM32F4-Discovery board: There, first SRAM block also has faster timings than the second one (maybe a general situation for the Cortex-M4?). Only in that case, the second block isn't much of a loss with 16KB. Here, we can't just ditch any of the blocks without losing a huge chunk of memory. In most cases, this should be fine, as the tests usually put all LUTs in flash or the stack. However, as soon as a LUT or similar object overlaps SRAM1/2, there might be a timing side-channel. Not the end of the world for a benchmarking platform, but still annoying. For now I just use the entire RAM as one large block, mostly to have a physical platform with a lot of memory. Timings should be expected to be slightly slower than the STM32F4-Discovery, as most operations would use the SRAM2/3 (as the stack is there), which exhibits slightly worse timings in for loads.
To flash the board, you'll need at least OpenOCD 0.11. Also included is a custom openocd script, since the board appears to have a different reset procedure than most other Nucleo/Discovery boards. While
st-util
can flash this board, it will in some cases end up in a weird reset state and hang. The openocd variant works reliably for me.