STM3220G-EVAL: Update README.txt file describing how to build using the IAR toolchain
This commit is contained in:
parent
7d2937d481
commit
1df1148bae
@ -185,6 +185,90 @@ IDEs
|
||||
one time from the Cygwin command line in order to obtain the pre-built
|
||||
startup object needed by RIDE.
|
||||
|
||||
Export nuttx to IAR or uVision workspace
|
||||
----------------------------------------
|
||||
The script nuttx/toos/ide_exporter.py will help to create nuttx project in
|
||||
these IDEs. Here are few simple the steps to export the IDE workspaces:
|
||||
|
||||
1) Start the NuttX build from the Cygwin command line before trying to
|
||||
create your project by running:
|
||||
|
||||
make V=1 |& tee build_log
|
||||
|
||||
This is necessary to certain auto-generated files and directories that
|
||||
will be needed. This will provide the build log to construct the IDE
|
||||
project also.
|
||||
|
||||
2) Export the IDE project base on that make log. The script usage:
|
||||
|
||||
usage: ide_exporter.py [-h] [-v] [-o OUT_DIR] [-d] build_log {iar,uvision_armcc,uvision_gcc} template_dir
|
||||
|
||||
positional arguments:
|
||||
build_log Log file from make V=1
|
||||
{iar,uvision_armcc,uvision_gcc}
|
||||
The target IDE: iar, uvision_gcc, (uvision_armcc is experimental)
|
||||
template_dir Directory that contains IDEs template projects
|
||||
|
||||
optional arguments:
|
||||
-h, --help show this help message and exit
|
||||
-v, --version show program's version number and exit
|
||||
-o OUT_DIR, --output OUT_DIR
|
||||
Output directory
|
||||
-d, --dump Dump project structure tree
|
||||
|
||||
Example:
|
||||
cd nuttx
|
||||
make V=1 |& tee build_log
|
||||
|
||||
./tools/ide_exporter.py makelog_f2nsh_c iar ./configs/stm3220g-eval/ide/template/iar -o ./configs/stm3220g-eval/ide/nsh/iar
|
||||
|
||||
or
|
||||
|
||||
./tools/ide_exporter.py makelog_f2nsh_c uvision_gcc ./configs/stm3220g-eval/ide/template/uvision_gcc/ -o ./configs/stm3220g-eval/ide/nsh/uvision
|
||||
|
||||
3) Limitations:
|
||||
- iar supports C only. Iar C++ does not compatible with g++ so disable
|
||||
C++ if you want to use iar.
|
||||
- uvision_armcc : nuttx asm (inline and .asm) can't be compiled with
|
||||
armcc so do not use this option.
|
||||
- uvision_gcc : uvision project that uses gcc. Need to specify path to
|
||||
gnu toolchain.
|
||||
In uVison menu, select:
|
||||
|
||||
Project/Manage/Project Items.../FolderExtension/Use GCC compiler/ PreFix, Folder
|
||||
|
||||
4) Template projects' constrains:
|
||||
- mcu, core, link script shall be configured in template project
|
||||
- Templates' name are fixed:
|
||||
- template_nuttx.eww : iar nuttx workspace template
|
||||
- template_nuttx_lib.ewp : iar nuttx library project template
|
||||
- template_nuttx_main.ewp : iar nuttx main project template
|
||||
- template_nuttx.uvmpw : uVision workspace
|
||||
- template_nuttx_lib.uvproj : uVision library project
|
||||
- template_nuttx_main.uvproj : uVision main project
|
||||
- iar:
|
||||
- Library option shall be set to 'None' so that iar could use nuttx libc
|
||||
- __ASSEMBLY__ symbol shall be defined in assembler
|
||||
- uVision_gcc:
|
||||
- There should be one fake .S file in projects that has been defined __ASSEMBLY__ in assembler.
|
||||
- In Option/CC tab : disable warning
|
||||
- In Option/CC tab : select Compile thump code (or Misc control = -mthumb)
|
||||
- template_nuttx_lib.uvproj shall add 'Post build action' to copy .a file to .\lib
|
||||
- template_nuttx_main.uvproj Linker:
|
||||
- Select 'Do not use Standard System Startup Files' and 'Do not use Standard System Libraries'
|
||||
- Do not select 'Use Math libraries'
|
||||
- Misc control = --entry=__start
|
||||
|
||||
5) How to create template for other configurations:
|
||||
1) uVision with gcc toolchain:
|
||||
- Copy 3 uVision project files
|
||||
- Select the MCU for main and lib project
|
||||
- Correct the path to ld script if needed
|
||||
2) iar:
|
||||
- Check if the arch supportes iar (only armv7-m is supprt iar now)
|
||||
- Select the MCU for main and lib project
|
||||
- Add new ld script file for iar
|
||||
|
||||
NuttX EABI "buildroot" Toolchain
|
||||
================================
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user