Using NuttX OS as a library on Atmel Studio 7
来源:互联网 发布:java的数据结构有哪些 编辑:程序博客网 时间:2024/05/22 01:42
This document explains how to add NuttX OS to your application on Atmel Studio 7, using NuttX OS as a library. With Atmel Studio 7 easy-to-use feature, you can easily set up the project by following below steps. This project will base on Atmel SAMD21 Xplained Pro, a 32bit ARM Cortex-M0+ MCU with up to 48MHz operating frequency.
Before we start it, must make sure you have executed the ./configure.sh to select samd21-xplained\nsh as NuttX OS configuration file. Then now you should execute:
make export
It will take several minutes to cross compile NuttX OS source file and then you will get a zip file like this nuttx-export-7.22.zip. Now let’s start creating the project on Atmel Studio 7. Launch Atmel Studio 7 and select File->New ->Project to create a new project for SAMD21 Xplained Pro.
Please select GCC C Executable Project, input project Name and choose the proper folder you want to save your project.
The last step is to choose the device for the project, of source, we should choose ATSAMD21J18A. Click OK and wait for Atmel Studio 7 generating project file automatically.
Copy exported file to your project folder and modify the fold name to ‘nuttx-7.22’.
Remove unnecessary files from project.
Add nuttx-7.22 header files and libraries to project.
Right click ‘nuttx_samd21’ project and select ‘Properties’, let us configure the project, such as ‘Directories’, Linker library and so on.
The last step is to copy nsh_main.c from nuttx-7.22\apps\examples\nsh folder to your project and rename the file to main.c. OK, we can compile the project now and wait for the compiling result. Error message will show like below picture. The way to correct these errors is to remove spi_bitband.c.
We are luck, only 2 Errors left. In main.c, please comment there are 2 header files.
//#include “platform/cxxinitialize.h”
//#include “nshlib/nshlib.h”
Otherwise the error message will tell you that no such file or directory.
The compiling process was succeeded, flash memory usage was 42 KB and data memory usage was 3.4 KB.
If you do not need to use nsh library, it will take less flash memory usage. Only 24 KB flash memory used for running NuttX on SAMD21 Xplained with rich OS features. That is a big surprise for me.
Before start running NuttX OS on SAMD21 Xplained, we should set up debug tools in Atmel Studio 7.
Now we can debug the NuttX OS based project on Atmel Studio 7, have fun with NuttX and Atmel Studio 7 & SAMD21 Xplained.
At the end of this blog, I want to thank Alan for his help and suggestion. The readers can visit his blog and there are many articles about NuttX will helpful for you. Alan C. Assis
- Using NuttX OS as a library on Atmel Studio 7
- ArcGIS Engine Controls fail to build using Visual Studio 2010 on a 64-bit OS
- android studio 1.3.1 project as a library
- Using Clang as a Library----Choosing the Right Interface for Your Application---翻译
- Using Images as Buttons on Windows Phone 7
- Using Emacs as a server
- Using MySQL as a NoSQL
- Android Studio报错 Error: A library uses the same package as this project:
- nuttx os porting
- Android Studio using a library and project with the same package name
- For CImage Library using visual studio 2010
- Atmel studio注意事项
- Error when using imshow on OS X
- Using pthread_barrier on Mac OS X
- using zsh on MAC OS X
- A brief on using CreateRemoteThread
- Atmel Cortex-A5跑Nuttx是如此酸爽
- Nuttx在Atmel SAMV71 Xplained上的配置
- 接口优于抽象类。
- sublime text3插件管理器加载
- window 7 下-apache安装
- Linunx系统日志及相关操作
- apache sentry安装
- Using NuttX OS as a library on Atmel Studio 7
- RSA
- Frida官方手册
- 数位DP
- 设计模式之命令模式
- 循环2级运用,模拟发牌与九九乘法表
- 基于spring-data-redis的分布式锁
- 三菱PLC编程线缆制作
- 32位和64位常用数据结构所占字节数