Close

Setting up build environment

A project log for HP 82240B IR Receiver and Printer Interface

This is an IR receiver and interface for adapting a commodity receipt printer to be 82240B-compatible.

ziggurat29ziggurat29 06/24/2017 at 15:410 Comments

In advance of receiving parts off the slow boat from China, I set up my build system.
There's plenty of choices, but in the interest of simplicity, I have elected to use the various free tools from ST Microelectronics. You have to register a free account with them (they really don't send me any junk email) to get access to the tools. These include:

* STM32CubeMX -- this is a 'wizard' tool whereby you define your board and it generates a skeleton project for various build systems. It's Java based, so it's slow as Christmas, but it is useful, especially when doing clock configuration for the more complicated devices.

* System Workbench -- this is an Eclipse-based build environment. I personally dislike Eclipse, and it too is Java based and slow as Christmas, but it really is convenient to have a complete toolchain that installs correctly out-of-box, and also to have a source-level debugger, so I put up with it. Mostly, I use this just to build and step in the debugger -- the bulk of my code authoring I do outside of it in Notepad++.

* ST-Link v2.1 -- this is the JTAG & SWD debugger physical interface. You will want this for debugging, and probably already have one if you have done any other ST development. There is a software package 'ST-Link Utility' that works directly with it. That is not critical, but I find it handy sometimes for simple chores like erasing the chip or dumping images from flash, or sometimes just sanity checking.

* All the usual docs: the Reference Manual, the Datasheet, the Errata, and any info I could find about the BluePill board, which is available from many sources on the Internet.

These ST chips typically have a factory-installed bootloader. It's somewhat of a pity that this one does not support USB, though, which means that folks just wanting to flash the pre-built firmware will need to do it over the UART, which in turn typically implies a USB-to-serial adapter and some soldering. Developers will probably prefer to burn over the ST-Link.

Today, I created my STM32CubeMX 'project' file based on documentation for the board, and guesses about where I will probably put my IO. I generated the skeleton project, and did a test build. This was just a sanity check, and to get a feel for memory consumption. I don't have any actual boards, yet, so I can't really doing any testing.

I'll probably carry on in the meantime by building some skeleton framework code for the low-level IR interface, and low-level serial printer interface.

Discussions