luweiqi / tumanako-inverter-fw-bootloader Goto Github PK
View Code? Open in Web Editor NEWThis project forked from jsphuebner/tumanako-inverter-fw-bootloader
This project forked from jsphuebner/tumanako-inverter-fw-bootloader
-------------------------------------------- -- STM32 Bootloader -- -- Johannes Hübner <[email protected]> -------------------------------------------- This boot loader does not interact with the built-in STM32 boot loader. It uses an interface of your choice, right now this is USART3. The interface flexibility and the independence from the BOOT pins are the main reasons for implementing this boot loader. New update protocol - 115200-8-N-2 (2 stop bits necessary when using a ZigBee module) 1 Send '2' indicating version 2 bootloader, wait about 500ms for magic byte 0xAA 2 If no reply goto 7 3 Send an 'S' indicating that it is awaiting an update size in pages 4 If no reply within about 500ms go to step 7 4.1 otherwise send a 'P' indicating that it is awaiting the actual page as a binary image 4.2 When page not received within about 1s, print 'T' and keep waiting 5 When page received send a 'C' indicating that it is awaiting the pages checksum 6 When checksum is correct and more pages need to be received, go to step 4.1 6.1 if all pages have been received go to step 5 6.2 When checksum isn't correct print an 'E' then go to step 4.1 7 When done print a 'D' and start main firmware Notes: - By checksum I mean the one calculated by the STMs integrated CRC32 unit. - The actual firmware has a reset command the cycle through the bootloader - The main firmware must be linked to start at address 0x08001000 - The bootloader starts at address 0x08000000 and can be 4k in size (right now its around 2.5k) -------------------------------------------- -- STM32 Bootloader Updater -- -- Johannes Hübner <[email protected]> -------------------------------------------- To be able to upgrade the boot loader code without a JTAG programmer an upgrade application was developed. It follows the same protocol as the boot loader but with different timing: 1. Keep printing "2" until magic and a page count <= 4 is received 2. Do the update process except the received pages are written to base address 0x08000000 3. Wait for "reset" command To upgrade the bootloader, do the following, either using the web interface or the python script 1. Send file stm32_bootupdater.bin 2. Send file stm32_loader.bin 3. Send file stm32_sine.bin -------------------------------------------- -- Compiling -------------------------------------------- You will need the arm-none-eabi toolchain: https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads The only external depedency is libopencm3 which I forked. You can download and build this dependency by typing make get-deps Now you can compile stm32-loader and stm32-bootupdater by typing make cd bootupdater make And upload it to your board using a JTAG/SWD adapter, the updater.py script or the esp8266 web interface
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.