Using NuttX OS as a library on Atmel Studio 7

2023-05-16

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.
启动Atmel Studio 7

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

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Using NuttX OS as a library on Atmel Studio 7 的相关文章

随机推荐

  • stm32cubemx hal学习记录:PWR 低功耗停止模式

    一 低功耗停止模式 1 所有时钟都已经停止 2 进入方式 xff1a 配置PWR CR寄存器的PDDS 43 LPDS位 43 SLEEPDEEP位 43 WFI或WFE命令 3 唤醒方式 xff1a 任意外部中断 4 关闭所有1 8v区域
  • Ubuntu下查看文件、文件夹和磁盘空间的大小

    在实际使用ubuntu时候 xff0c 经常要碰到需要查看文件以及文件夹大小的情况 有时候 xff0c 自己创建压缩文件 xff0c 可以使用 ls hl 查看文件大小 参数 h 表示Human Readable xff0c 使用GB MB
  • stm32cubemx hal学习记录:FreeRTOS任务管理

    一 基本配置 1 配置RCC USART1 时钟84MHz 2 配置SYS xff0c 将Timebase Source修改为除滴答定时器外的其他定时器 xff0c 因为滴答定时器被用于时钟基准 xff0c 可以实现任务切换 Timebas
  • 【面试笔试-c/c++】2013年校园招聘创新工场笔试题(北邮场)

    2013年校园招聘创新工场笔试题 xff08 北邮场 xff09 及一面 题目节后补上 回家了 xff0c 上网不方便 面试题 一面 xff1a 1 手写二叉树的中序非递归遍历 xff0c 一步一步解释代码 xff0c 给个二叉树示范代码流
  • PX4驱动分析之MPU6000

    PX4驱动分析之MPU6000 前言 xff1a 首先分析PX4中MPU6000传感器驱动的注册 xff0c 调用 xff0c 实例的过程 xff0c 先要理解一个事情 就是PX4是使用了一个类Linux操作系统的Nuttx操作系统 也就是
  • PX4分析系列之添加北醒TOF传感器(使用UART)

    PX4分析系列之添加北醒TOF传感器 xff08 使用UART xff09 提示 xff1a 一个飞行器爱好者 xff0c 才疏学浅 通过自己学习PX4源码的过程 xff0c 进行分析和记录 欢迎各路大神讨论 xff0c 并指正文中错误 x
  • 产品化的理解

    我对产品化的理解 产品化的时机是看业务的需要 xff0c 不管是对前景的落实 xff0c 还是项目转化成产品 xff0c 这些都不是技术人员能考虑的 xff0c 业务的发展和策划 xff0c 如何进行市场细化等如果都由技术人员考虑 xff0
  • JS对象转insert语句

    function obj2Sql tablename obj var sqls 61 34 34 f 61 34 34 v 61 34 34 obj forEach o 61 gt f 61 34 34 v 61 34 34 for let
  • HTML5小试 双人贪吃蛇

    lt html gt lt head gt lt head gt lt body gt lt div style 61 34 float left 34 gt 当前速度1 xff1a lt button nclick 61 34 jianc
  • 九个Console命令,让js调试更简单

    九个Console命令 xff0c 让js调试更简单 一 显示信息的命令 lt DOCTYPE html gt lt html gt lt head gt lt title gt 常用console命令 lt title gt lt met
  • echarts自定义功能按钮图片 网络路径格式

    toolbox show true orient 39 vertical 39 x 39 left 39 top 39 20 39 feature myTool show true title 39 自定义扩展方法 39 icon 39 i
  • 上班摸鱼逛博客,逮到一个字节8年测试开发,聊过之后羞愧难当......

    老话说的好 xff0c 这人呐 xff0c 一旦在某个领域鲜有敌手了 xff0c 就会闲得某疼 前几天我在上班摸鱼刷博客的时候认识了一位字节测试开发大佬 xff0c 在字节工作了8年 xff0c 因为本人天赋比较高 xff0c 平时工作也兢
  • Ubuntu下USB权限问题以及udev规则文件笔记

    在ubuntu系统下使用传感器的时候 xff0c 通常会遇到一些权限上的问题 比如我使用ROS驱动包来启动bluefox摄像头 xff0c 如果没有任何关于权限上的处理就会提示权限问题导致无法正常启动该摄像头 xff0c 如下图 xff1a
  • 三.卡尔曼滤波器(EKF)开发实践之三: 基于三个传感器的海拔高度数据融合

    本系列文章主要介绍如何在工程实践中使用卡尔曼滤波器 分七个小节介绍 一 卡尔曼滤波器开发实践之一 五大公式 二 卡尔曼滤波器开发实践之二 一个简单的位置估计卡尔曼滤波器 三 卡尔曼滤波器 EKF 开发实践之三 基于三个传感器的海拔高度数据融
  • 树莓派 - 1 安装与配置 - a 系统安装(Raspbian)

    xff08 1 xff09 软件 Raspbian operating system https www raspberrypi org downloads raspbian Etcher SD card writing tool http
  • 分享一个Linux的录屏工具script

    在使用该命令后 xff0c 直接录屏 xff0c 会记录终端在命令行的所有动作 想让别人帮你操作 xff0c 但你的思路跟不上对方敲命令的速度 xff0c 可以先录下来 xff0c 然后回去慢慢琢磨 我的是centos7系统 span cl
  • 最佳Linux防病毒软件推荐!

    看到标题或许你会疑问 xff0c linux如此安全 xff0c 为什么我们还需要安装防病毒软件呢 确实 xff0c linux为全球超过70 的web服务器提供支持 xff0c 黑客极有动机来制造强大的病毒来渗透这些服务器安全系统 xff
  • NvidiaAGXXavier刷机Jetpack5.0.2报错记录(已解决,非搬运)

    网上有很多教程 xff0c 很详细的讲了这个板子刷机应该怎么去做 xff0c 正常的话就按照那个步骤走就可以了 xff0c 这里就不再赘述了 xff0c 但是我在给自己的NvidiaAgxXavier刷Jetpack5 0 2的时候 xff
  • Atmel Cortex-A5跑Nuttx是如此酸爽

    开源RTOS Nuttx已经支持Atmel SAMA5系列MPU xff0c 而且看到Nuttx还支持Graphic API xff0c 决定尝试在Ateml SAMA5D3 Xplained上跑下Nuttx Nuttx是一款开源RTOS
  • Using NuttX OS as a library on Atmel Studio 7

    This document explains how to add NuttX OS to your application on Atmel Studio 7 using NuttX OS as a library With Atmel