Skip to content
Daniel Mosquera edited this page May 15, 2023 · 12 revisions

Dev Setup

This section should help you to get your development setup going.

In order to debug and step through the code on hardware you will need the following:

  • USB debugger
  • ESC with easily accessible pins - this can be any BLHeli_S compatible ESC, the one linked has all needed pins acessible
  • Regulated power supply - although this is not strictly needed, it is highly recommended. You should set some reasonable current limit to prevent you from releasing the magic smoke should something go wrong

Software

You will need to have windows with Simplicity Studio installed. Most of the core team develop on a Linux host and have a Windows VM running. You can download virtual machine images of Windows 11 directly from microsoft.

Urls with information about Bluejay/Blheli_s/SimonK technology

https://www.embedded.com/designing-a-mcu-driven-permanent-magnet-bldc-motor-controller-part-1/

https://www.embedded.com/designing-a-mcu-driven-permanent-magnet-bldc-motor-controller-part-2/

https://www.embedded.com/designing-a-mcu-driven-permanent-magnet-bldc-motor-controller-part-3/

https://www.st.com/resource/en/application_note/an1946-sensorless-bldc-motor-control-and-bemf-sampling-methods-with--st7mc-stmicroelectronics.pdf

https://www.mouser.com/pdfDocs/AN13000.pdf

Building from source

The Bluejay source code is turned into a firmware binary using the Keil A51 assembler. This section can be used even if you don't have the full dev environment set up as described in the step above.

Obtaining the toolchain

To obtain the toolchain, download the C51 package from Keil. Run it with wine:

wine c51v960a.exe

This will install the toolchain and uVision. To obtain a license key (which you will need in order to link files above a certain size) you will have to run uVision in order to get your Computer ID.

wine ~/.wine/drive_c/Keil_v5/UV4/UV4.exe

Go to File -> License Management note your Computer ID.

With this information, you can request a license key on the Keil license installation page. In the CID field, you need to enter the Computer ID which uVision showed you in the previous step.

The license ID will be sent to you via E-Mail, once received you paste it into the LIC field, press "Add LIC" and you are done.

Building

For your convenience, a Docker Image is provided that will set up the toolchain. For this to work you need to have completed the step Registering via Wine and your .wine directory has to be copied to the tools directory.

The .wine directory can be deleted from the tools directory after the docker image has been created.

To build the docker image install docker and from the tools directory run:

docker build -t bluejay-build .

A build script is provided, it will build all targets if no further parameters are provided:

./build.sh

or a specific target if you chose to:

./build.sh -l A -m H -d 0 -p 96

If a specific target is chosen, all parameters need to be provided: layout, MCU, deadtime, and PWM.

Hardware setup

Here you can check hw setups we use to develop Bluejay.

LANRC setup IMG_20230410_234406 IMG_20230410_223020 IMG_20230410_223028 IMG_20230410_223034 IMG_20230410_223048

Favourite setup IMG_20230411_191150 IMG_20230411_191202 IMG_20230411_191212