SJ2 Board and Software
SJ2 Development Environment
There are two major components of the development environment:
- Compile a program for the ARM processor (such as the SJ2 board)
- Compile a program for your host machine (your laptop)
Get started with the development environment by either:
- Download and install Git and then clone the SJ2-C repository
- Go to the SJ2-C repository and download the zip file
Compile the SJ2 project
Most of the documentation related to the ARM compiler is captured in a few README files that you can read here. We will not repeat the details here so please read the linked article. You can watch the following video to get started:
After setting up the SJ2-C development environment, try the following:
- Compile the FreeRTOS sample project (
- Load it onto the processor
- Modify the program (maybe printf statement), and load/run it again
- Use a serial terminal program or Google Chrome browser based terminal program
- Type "help" at the terminal window. Also try "help <command name>"
- Use all of the possible commands, and briefly skim through the code at
handlers_general.cto get an idea of how the code works for each command.
Computer cannot recognize the SJ2 development board.
- This error normally happens because of missing Silicon Lab driver.
- Solution: check the install folder inside the development packet (...sjtwo-c-master\installs\drivers). Please Install the driver, then start the computer and try to connect the device again.
"No such file or directory " after running Scons command.
- Please check, if the directory to the development folder has a name, which contain white space.
- Solution: Don’t use directory with spaces.
Cannot recognize the command Scons.
- This error normally happens when Scons is not installed, there are corruption during the installation Scons packet. Sometimes, you need to upgrade the pip to latest version in order to install Scons
- Solution: Please check the pip version and upgrade the pip to latest version, then reinstall the Scons if necessary. After installation, restart the computer and try the Scons command again.
"Sh 1 : python : not found" after running Scons command
- It might appear when you have a multiple python versions, or you already had a python with different management packet (For example, python is installed in your machine through Anaconda, etc ). As the result, the python path might not setup correctly.
Solution: Please check out these two article for your best option:
- Window users: https://datatofish.com/add-python-to-windows-path/
- Linux users: https://www.tutorialspoint.com/python3/python_environment.htm
- To make it simple, You can also uninstall the python environment, and download the latest python version here then reinstall it again ( check in Add Python x.y to PATH at the beginning of the installing option )
Compile x86 project
x86 stands for instruction set for your laptop, which means that the project can be compiled and run on your machine without having to compile, load, and run it on your hex project. Being able to compile a project for your x86 host machine also provides the platform for being able to run unit-tests.
SJ2 Board Startup
- The real boot location is actually at
- Initial values of RAM are copied from Flash memory's
- ARM core's floating point unit, and interrupts are initialized
- Clock and a timer API is initialized
- Peripherals and sensors are initialized
- Finally, call to
The development environment contains built-in code formatting tool. Each time you compile, it will first reformat the source code according to preset Google coding format.
SJ2 board has lots of in-built sensors and a 128*64 OLED. It has 96kb of RAM and 120MHZ CPU.