ghidraninja / game-and-watch-flashloader Goto Github PK
View Code? Open in Web Editor NEWA small tool to flash the SPI-flash using OpenOCD.
A small tool to flash the SPI-flash using OpenOCD.
i can't build
make arm-none-eabi-gcc -c -mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard -DUSE_HAL_DRIVER -DSTM32H7B0xx -ICore/chocdoom -ICore/Inc -IDrivers/STM32H7xx_HAL_Driver/Inc -IDrivers/STM32H7xx_HAL_Driver/Inc/Legacy -IDrivers/CMSIS/Device/ST/STM32H7xx/Include -IDrivers/CMSIS/Include -Og -Wall -fdata-sections -ffunction-sections -g -gdwarf-2 -O0 -MMD -MP -MF"build/flash.d" -Wa,-a,-ad,-alms=build/flash.lst Core/Src/flash.c -o build/flash.o In file included from Core/Src/flash.c:1: Core/Inc/flash.h:4:10: fatal error: stm32h7xx_hal.h: No such file or directory 4 | #include "stm32h7xx_hal.h" | ^~~~~~~~~~~~~~~~~ compilation terminated. make: *** [Makefile:254: build/flash.o] Error 1
When using a brand new MX25U12835FM2I-10G the quad bit doesn't seem to be set, leading to issues later on.
The stock firmware seems to set it correctly, so users who have used the stock firmware with the new flash will be able to use HALF_QUAD_MODE properly.
I'm having this issue where the flashloader is trying to write past the point of the flash memory's limit. I basically have the drivers imported from the Game and Watch Retro Go repo, and the build I'm using is the gw_base code. Here is the output of what I'm getting:
Loading image into RAM...
Open On-Chip Debugger 0.11.0-rc2+dev-gf68ade5-dirty (2021-02-12-20:31)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : J-Link V11 compiled Jul 17 2020 16:24:07
Info : Hardware version: 11.00
Info : VTarget = 1.909 V
Info : clock speed 1800 kHz
Info : SWD DPIDR 0x6ba02477
Info : stm32h7x.cpu0: hardware has 8 breakpoints, 4 watchpoints
Info : starting gdb server for stm32h7x.cpu0 on 3333
Info : Listening on port 3333 for gdb connections
Resetting device
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x08017a44 msp: 0x20011330
Programming ELF
20188 bytes written at address 0x00000000
6840 bytes written at address 0x20000000
downloaded 27028 bytes in 0.233674s (112.955 KiB/s)
Loading image into RAM
Info : SWD DPIDR 0x6ba02477
Error: Failed to write memory at 0x24100000
I'm using a JLink Edu, and running MacOS Big Sur.
on the cheap stlinks they seems to fail sometimes on flashing but after a power cycle I've never had a repeat failure of that chunk, something like this would be superb!
`
COUNT=3
for RETRY_COUNT in $(seq $COUNT); do
if [[ $RETRY_COUNT -gt 1 ]]; then
echo "Flashing chunk $i failed... power cycle unit and retry? (y/n)"
read -n 1 -r
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
echo "Aborted."
exit 1
fi
echo "Retry count $RETRY_COUNT/3"
fi
${DIR}/flash.sh ${TMPFILE} ${ADDRESS_HEX} ${SIZE_HEX} ${ERASE} ${ERASE_BYTES} && break
done`
oh also whatever file says "preparing chunk x..." the chunk is always 1 regardless of what chunk your on
Title speaks for itself, here's the last few lines of the command output of make
[ WGET ] mpu_armv7.h
[ CC ] main.o
Segmentation fault
make: *** [Makefile:233: build/main.o] Error 139
Core/Src/flash.c: At top level:
Core/Src/flash.c:108:7: warning: conflicting types for 'OSPI_NOR_WriteEnable'
108 | void OSPI_NOR_WriteEnable(OSPI_HandleTypeDef *hospi)
| ^~~~~~~~~~~~~~~~~~~~
Core/Src/flash.c:101:5: note: previous implicit declaration of 'OSPI_NOR_WriteEnable' was here
101 | OSPI_NOR_WriteEnable(hospi);
| ^~~~~~~~~~~~~~~~~~~~
Core/Src/flash.c: In function 'OSPI_NOR_WriteEnable':
Core/Src/flash.c:112:11: warning: unused variable 'reg' [-Wunused-variable]
112 | uint8_t reg[2];
| ^~~
Core/Src/flash.c:111:27: warning: unused variable 'sConfig' [-Wunused-variable]
111 | OSPI_AutoPollingTypeDef sConfig;
| ^~~~~~~
make: *** No rule to make target build/startup_stm32h7b0xx.o', needed by
build/gw_base.elf'. Stop.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.