This is an old revision of the document!
NO-OS Project Build Guide
NOTE: This build guide is valid for the projects found in the
no-OS/projects folder. If your project resides elsewhere under the no-
OS repository tree, it is a legacy project. A build guide for legacy projects can be found
Build no-OS with GNU make.
Build Prerequisites
Prior to building a no-OS project, it is required to set up some environment variables so that the build process may find the necessary tools (compiler, linker, SDK etc.).
If no-OS IIO framework will be needed the libtinyiiod submodule needs to be initialized first:
git submodule update --init libraries/iio/libtinyiiod
Some project may require other submodules. To initialize all of them run:
git submodule update --recursive
Use the following commands to prepare your environment for building no-OS projects:
Assuming the SDK is installed at this path:
/path/to/intel
└── intelFPGA
└── 18.1
Run:
$ source no-OS/tools/scripts/platform/intel/environment.sh /path/to/intel/intelFPGA 18.1
Assuming the SDK is installed at this path:
/path/to/xilinx
└── Xilinx
├── DocNav
├── Downloads
├── SDK
│ ├── 2017.4
│ └── 2018.3
├── Vivado
│ ├── 2017.4
│ └── 2018.3
└── xic
Run:
$ source /path/to/xilinx/Xilinx/SDK/2018.3/settings64.sh
For more information, consult the support/answers/47821.html.
Download your relevant STM32Cube package by cloning from STMicroelectronics github repo:
$ cd /path/to/stm32cube
$ git clone https://github.com/STMicroelectronics/STM32CubeF4.git
$ tree .
/path/to/stm32cube
├── STM32CubeF0
├── STM32CubeF4
├── STM32CubeL0
└── STM32CubeL1
Run:
$ export STM32CUBE=/path/to/stm32cube
ADuCM3029 (Click to expand)
ADuCM3029 (Click to expand)
Common Issues with environment setup:
Windows (Click to expand)
Windows (Click to expand)
Assuming the SDK is installed at this path:
C:\
└── intelFPGA
└── 18.1
Run:
> .\no-OS\tools\scripts\platform\altera\environment.bat C:\intelFpga 18.1
Assuming the SDK is installed at this path:
C:\
└── Xilinx
├── DocNav
├── Downloads
├── SDK
│ ├── 2017.4
│ └── 2018.3
├── Vivado
│ ├── 2017.4
│ └── 2018.3
└── xic
Run:
> C:\Xilinx\SDK\2018.3\settings64.bat
For more information, consult the Xilinx support support/answers/47821.html.
Note that Xilinx SDK versions 2018.3 or earlier don't properly set up the Windows PATH so that you may use make command provided with the SDK from the shell.
If this is the case, please manually add the following to your Windows PATH or install make for Windows of your choice:
C:\Xilinx\SDK\2018.3\gnuwin\bin
ADuCM3029 (Click to expand)
ADuCM3029 (Click to expand)
Common Issues with environment setup:
If using PowerShell instead of cmd, open another shell instance after running the above scripts.
Building a project
Go in the project directory that should be built.
$ cd no-OS/projects/project_name/
$ tree
.
├── builds.json
├── Makefile
├── src
└── src.mk
Copy the .sof and .sopcinfo to the project folder.
$ ls
Makefile profiles src src.mk system_bd.sopcinfo adrv9009_a10gx.sof
$ make
# Alternatively you may select a .sopcinfo file explicitly by:
$ make HARDWARE=path/to/system_bd.sopcinfo
Copy the .hdf in the project folder.
$ ls
Makefile profiles src src.mk system_top.hdf
$ make
# Alternatively you may select an .hdf file explicitly by:
$ make HARDWARE=path/to/file.hdf
ADuCM3029 (Click to expand)
ADuCM3029 (Click to expand)
The ADuCM3029 projects also contain a pinmux_config.c
file which contains pin configuration instructions.
# build an ADuCM3029-only project
$ make
# if the platform autodetection picks the wrong platform, explicitly specify the PLATFORM
$ make PLATFORM=aducm3029
Windows (Click to expand)
Windows (Click to expand)
CMD needs to be run with
administrative privileges to create a project.
If this is not possible, check the standalone section.
> cd .\no-OS\projects\project_name\
It should contain make-related files and source files:
.\no-OS\projects\project_name\
├── builds.json
├── Makefile
├── src
└── src.mk
Copy the .sof and .sopcinfo to the project folder and run:
.\no-OS\projects\adrv9009\
├── Makefile
├── profiles
├── src
├── src.mk
├── system_bd.sopcinfo
└── adrv9009_a10gx.sof
> make
Copy the .hdf to the project folder and run:
.\no-OS\projects\adrv9009\
├── Makefile
├── profiles
├── src
├── src.mk
└── system_top.hdf
> make
ADuCM3029 (Click to expand)
ADuCM3029 (Click to expand)
The ADuCM3029 projects also contain a pinmux_config.c
file which contains pin configuration instructions.
# build an ADuCM3029-only project
> make
# if the platform autodetection picks the wrong platform, explicitly specify the PLATFORM
> make PLATFORM=aducm3029
The build process creates a build directory in the project folder:
build
├── app
├── bsp
├── obj
├── release.elf
└── tmp
Standalone project
By default project are built creating links in the build/app folder to no-OS files in order to easy track changes.
If a self contained project is needed, to create it run:
make standalone
Debugging/Running
Once the .elf
or .hex
file has been generated, make sure the board is powered on, JTAG cable connected and use the following commands to upload the program to the board or debug.
Uploading the binary to target is generically achieved with:
$ make run
However, debugging interface might be different across platforms and the specifics are documented below.
Launch XSDK to be able to debug graphically by clicking the debug button.
$ xsdk -workspace=build
In order to run/debug on STM32 from command line, the makefile targets make use of the STM32CubeIDE modified version of openocd and a stock arm-none-eabi-gdb. Make sure you have them installed.
Assuming you've installed the STM32CubeIDE to /opt/stm32cubeide directory, use (and possibly adapt) the following commands:
$ export OPENOCD_BIN=/opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.externaltools.openocd.linux64_1.5.0.202011040924/tools/bin
$ export OPENOCD_SCRIPTS=/opt/stm32cubeide/plugins/com.st.stm32cube.ide.mcu.debug.openocd_1.5.0.202011091203/resources/openocd/st_scripts
Now you may run/debug with:
$ make PLATFORM=stm32 run
$ make PLATFORM=stm32 debug