This shows you the differences between two versions of the page.
Previous revisionNext revision | |||
— | resources:no-os:build [14 Dec 2021 15:32] – fix some stm32 errors Darius B | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | |||
+ | ====== NO-OS Project Build Guide ====== | ||
+ | |||
+ | <note tip> | ||
+ | |||
+ | Clone NO-OS with the '' | ||
+ | < | ||
+ | git clone --recursive https:// | ||
+ | </ | ||
+ | |||
+ | If however you've already cloned NO-OS without the '' | ||
+ | < | ||
+ | git submodule update --recursive --init | ||
+ | </ | ||
+ | |||
+ | ===== 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.). | ||
+ | |||
+ | Use the following commands to prepare your environment for building no-OS projects: | ||
+ | <hidden Linux (Click to expand)> | ||
+ | <hidden Intel (Click to expand)> | ||
+ | Assuming the SDK is installed at this path: | ||
+ | |||
+ | < | ||
+ | / | ||
+ | └── intelFPGA | ||
+ | └── 18.1 | ||
+ | </ | ||
+ | |||
+ | Run: | ||
+ | < | ||
+ | $ source no-OS/ | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | <hidden Xilinx (Click to expand)> | ||
+ | Assuming the Vitis is installed at this path: | ||
+ | |||
+ | < | ||
+ | / | ||
+ | ├── DocNav | ||
+ | ├── Downloads | ||
+ | ├── SDK | ||
+ | │ └── 2019.1 | ||
+ | └── Vitis | ||
+ | ├── 2020.1 | ||
+ | └── 2020.2 | ||
+ | </ | ||
+ | |||
+ | Run: | ||
+ | < | ||
+ | $ source / | ||
+ | </ | ||
+ | |||
+ | For more information, | ||
+ | </ | ||
+ | |||
+ | <hidden STM32 (Click to expand)> | ||
+ | |||
+ | * Install [[https:// | ||
+ | * Install [[https:// | ||
+ | * Install '' | ||
+ | </ | ||
+ | |||
+ | <hidden ADuCM3029 (Click to expand)> | ||
+ | * Install the CrossCore Embedded Studio 2.10 (refer to [[resources/ | ||
+ | * Manually Install '' | ||
+ | * Manually Install '' | ||
+ | |||
+ | <note important> | ||
+ | |||
+ | Common Issues with environment setup: | ||
+ | * Makefiles searches for the CCES_HOME in its default installation directory. It may happen that multiple version are installed and may not work. To select a '' | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | <hidden Windows (Click to expand)> | ||
+ | <hidden Intel (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: | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | <hidden Xilinx (Click to expand)> | ||
+ | Assuming the SDK is installed at this path: | ||
+ | < | ||
+ | C:\Xilinx | ||
+ | ├── DocNav | ||
+ | ├── Downloads | ||
+ | ├── SDK | ||
+ | │ | ||
+ | └── Vitis | ||
+ | ├── 2020.1 | ||
+ | └── 2020.2 | ||
+ | </ | ||
+ | |||
+ | Run: | ||
+ | < | ||
+ | > C: | ||
+ | </ | ||
+ | |||
+ | For more information, | ||
+ | |||
+ | <note important> | ||
+ | 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: | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | <hidden ADuCM3029 (Click to expand)> | ||
+ | * Install [[http:// | ||
+ | * Install the CrossCore Embedded Studio (refer to [[resources/ | ||
+ | * Manually Install '' | ||
+ | * Manually Install '' | ||
+ | |||
+ | <note important> | ||
+ | |||
+ | Common Issues with environment setup: | ||
+ | * Makefiles searches for the CCES_HOME in its default installation directory. It may happen that multiple version are installed and may not work. To select a '' | ||
+ | </ | ||
+ | |||
+ | <note important> | ||
+ | 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. | ||
+ | |||
+ | <hidden Linux (Click to expand)> | ||
+ | |||
+ | < | ||
+ | $ cd no-OS/ | ||
+ | $ tree | ||
+ | . | ||
+ | ├── builds.json | ||
+ | ├── Makefile | ||
+ | ├── src | ||
+ | └── src.mk | ||
+ | </ | ||
+ | |||
+ | <hidden Intel (Click to expand)> | ||
+ | Copy the **.sof** and **.sopcinfo** to the project folder. | ||
+ | |||
+ | < | ||
+ | $ ls | ||
+ | Makefile | ||
+ | $ make | ||
+ | |||
+ | # Alternatively you may select a .sopcinfo file explicitly by: | ||
+ | $ make HARDWARE=path/ | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | <hidden Xilinx (Click to expand)> | ||
+ | Copy the **.hdf** in the project folder. | ||
+ | |||
+ | < | ||
+ | $ ls | ||
+ | Makefile | ||
+ | $ make | ||
+ | |||
+ | # Alternatively you may select an .hdf file explicitly by: | ||
+ | $ make HARDWARE=path/ | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | <hidden STM32 (Click to expand)> | ||
+ | Make sure you have the .ioc file in the project directory, then type: | ||
+ | < | ||
+ | $ make | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | <hidden ADuCM3029 (Click to expand)> | ||
+ | The ADuCM3029 projects also contain a '' | ||
+ | |||
+ | < | ||
+ | # build an ADuCM3029-only project | ||
+ | $ make | ||
+ | |||
+ | # if the platform autodetection picks the wrong platform, explicitly specify the PLATFORM | ||
+ | $ make PLATFORM=aducm3029 | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | </ | ||
+ | |||
+ | <hidden Windows (Click to expand)> | ||
+ | <note important> | ||
+ | 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 | ||
+ | </ | ||
+ | |||
+ | <hidden Intel (Click to expand)> | ||
+ | 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 | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | <hidden Xilinx (Click to expand)> | ||
+ | Copy the **.hdf** to the project folder and run: | ||
+ | < | ||
+ | .\no-OS\projects\adrv9009\ | ||
+ | ├── Makefile | ||
+ | ├── profiles | ||
+ | ├── src | ||
+ | ├── src.mk | ||
+ | └── system_top.hdf | ||
+ | |||
+ | > make | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | <hidden ADuCM3029 (Click to expand)> | ||
+ | The ADuCM3029 projects also contain a '' | ||
+ | |||
+ | < | ||
+ | # 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 | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | ===== Debugging/ | ||
+ | |||
+ | Once the '' | ||
+ | |||
+ | 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. | ||
+ | <hidden Linux (Click to expand)> | ||
+ | <hidden Xilinx (Click to expand)> | ||
+ | Use the following command to launch XSDK to be able to debug graphically by clicking the debug button. < | ||
+ | $ make develop | ||
+ | </ | ||
+ | |||
+ | A debug configuration is created automatically, | ||
+ | </ | ||
+ | |||
+ | <hidden ADuCM3029 (Click to expand)> | ||
+ | Use the following command to launch CCES to be able to debug graphically by clicking the debug button. | ||
+ | < | ||
+ | $ make develop | ||
+ | </ | ||
+ | However, a debug configuration must be created first by following the debug session configuration section of [[: | ||
+ | </ | ||
+ | |||
+ | <hidden STM32 (Click to expand)> | ||
+ | If you prefer using plain '' | ||
+ | < | ||
+ | $ make debug | ||
+ | </ | ||
+ | |||
+ | Alternatively, | ||
+ | |||
+ | < | ||
+ | $ make develop | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||