Project update 8 of 9
I am getting ready to send a prototype to Crowd Supply. This is an exciting step! Crowd Supply requires all projects to send them a prototype before they launch. This gives them a chance to kick the tires and ensure backers will get what they pledge for. While writing up a how-to guide for the prototype, it occurred to me that I might as well share it with all of you. So here you go!
I will be sending:
And here’s what that looks like:
The first step will be to connect the USB cable to the Toolbox and power it using one of the supplied adapters (or a powered USB hub). Because of a hardware bug, the battery will definitely be dead by the time you receive the package. Upon applying power, the Toolbox will start-up to the battery status screen. You need to wait until the battery voltage is above
3.5 V to continue. If you try to do anything while the voltage is less than
3.5 V, the Toolbox will display a dialog that prevents you from doing so.
The embedded web server will start and try to connect to the Wi-Fi. It won’t be able to, so it will ask you if you want to configure it. You will definitely want to do that. The following video shows a quick walkthrough of the process.
Incidentally, I hope you like the jingle in that video because I used it in all four of them. (But don’t worry, I won’t be offended if you decide to mute it.)
Without using a computer at all, you can connect the Toolbox to a target board and verify that the SWD and trace output are working correctly. This next video shows how to connect the STM32F401 development board to the Toolbox and then use the touch display to flash a binary and view the trace output. This is a great way to make sure that everything’s working before you dive into serious development.
Please note: the wire coming off the development board is connected to the UART TX line of the STM32F401. It connects to pin 4 on the Toolbox (as shown in the Pinout)
The Toolbox serves a web application when you are at the startup screen. You can always get there by pushing the red "X" in the top right until you see the IP address of the device pop up (and the "X" goes away). While the server is running, you just point your browser to
http://<ip address>. The web application loads as a single file and then performs HTTP REST API requests as necessary. You will see the loading bar on the Toolbox display when you load the app. If it completes the load and stays blank, just try reloading the page.
Before you can flash binaries using the web application, you need to download the binaries from the Toolbox. You do that using the "Files" section. After you download the
fast.bin demo binaries, you can drag and drop them in the "Flash" section to program the target. The "Trace" section lets you view real-time trace output. You’ll want to ignore the "Debug" section for now.
You will also notice the documentation is built right into the web application, so there is no need to go searching around. Everything you need to know about how to use the Toolbox is available right there.
The touch display and web application provide a layer of convenience when you’re getting started or if you just want to take a quick look at something. But the real work is done using the command line. This is where you can integrate the Toolbox right into your build system and use it when iterating on your code.
In the video, I am using a
zsh shell. First, to make things a little easier, I create a shell variable for the http address:
export tbox=http://<ip address>
Then you can download the
fast.bin files using:
curl $tbox/fs/home/user/slow.bin > slow.bin curl $tbox/fs/home/user/fast.bin > fast.bin
Then to flash the target:
curl -X PUT --data-binary @slow.bin $tbox/flash/program/type/bin/start/0x08000000 curl -X PUT --data-binary @fast.bin $tbox/flash/program/type/bin/start/0x08000000
I don’t show it in the video, but you can view the Trace output using:
<ctrl-c> when you’re done with the stream.
If you want to tinker, you can use the following commands to see what requests are available:
curl $tbox/flash/help curl $tbox/trace/help curl $tbox/fs/help
No prototype demo would be complete without some never-before-seen failures, so let me give you a few tips in case things are not working as expected: