- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我是 Atmel Studio 的新手。我使用 ATSAMV71Q21 器件创建了新的 GCC C 执行项目。在 main.c 文件中添加 printf 然后运行 build 并得到一堆“ undefined reference (_write、_fsta 等)错误。我尝试了 Atmel“入门”示例,它工作正常。我该如何解决这个问题?下面是代码和错误消息。感谢您的帮助。
#include "sam.h"
#include <stdio.h>
#include <stdbool.h>
int main(void)
{
/* Initialize the SAM system */
SystemInit();
while (1)
{
printf("abc");
//TODO:: Please write your application code
}
}
d:/atmel/atmel toolchain/arm gcc/native/4.8.1443/arm-gnu-toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/lib/armv7e-m\libc.a(lib_a-sbrkr.o): In function '_sbrk_r': D:\Atmel\samv71_softpack_1.4_for_astudio_6_2\studio\Atmel\samv71_Xplained_Ultra\examples\test\test\Debug\sbrkr.c(1,1): error: undefined reference to '_sbrk'
最佳答案
我还不知道如何使用简单的 C 程序(#include "sam.h"
)来完成您想要的操作,但如果您愿意,我可以帮助您使用 ASF API。
您必须首先生成一个 C-ASF 项目。然后,您可以使用 ASF 向导将标准串行 I/O 添加到您的项目中。正确配置,printf、puts...将打印到连接到 Controller 的终端程序。
#include <asf.h>
#include "stdio_serial.h"
static void configure_console(void)
{
const usart_serial_options_t uart_serial_options = {
.baudrate = CONF_UART_BAUDRATE,
.paritytype = CONF_UART_PARIT
};
/* Configure console UART. */
sysclk_enable_peripheral_clock(CONSOLE_UART_ID);
stdio_serial_init(CONF_UART, &uart_serial_options);
}
int main(void)
{
/* Insert system clock initialization code here (sysclk_init()). */
sysclk_init();
board_init();
configure_console();
while (1) {
printf("abc");
}
return 0;
}
这适用于具有 SAM3X8E Controller 的 Arduino Due。
关于无法使用 printf 命令构建 atmel studio 6.2 项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33115350/
每个 Atmel UC3 显然都有一个唯一的序列号。有谁知道我如何在软件中检索它? 最佳答案 http://www.avrfreaks.net/index.php?name=PNphpBB2&file
我正在尝试借助 LED 切换功能来制作一个按钮去抖软件,该功能每次都会返回一个不同的 bool 值,这是我之前通过询问问题得到的,但从未起作用: #include bool ledToggle();
有人可以向我推荐 Atmel AVR 8 位微 Controller 的任何反汇编程序吗?有开源项目吗? 谢谢。 最佳答案 您还可以使用 avr-objdump,这是 avr-gcc 工具集 ( ht
我目前正在使用 Atmel SAM3X8 ARM 微 Controller ,该微 Controller 具有双组 2 x 256KB 闪存。我正在尝试实现固件更新功能,将新固件放入当前未使用的闪存库
我在 atmel studio 为我的 avr atmega 32 ic 编写了一个程序。通过键盘输入 0 到 999 之间的数字。我想把它显示在液晶屏上。我的问题是: lcd 仅采用 char 和
我正在开始使用新的 Atmel 板,为此我找到了此文档: http://asf.atmel.com/docs/latest/xmega.drivers.usart.example.xmega_a3bu
首先让我澄清一下,我已经阅读了很多关于这个问题的文章,我不想要类似的答案。 我想从存储在我的硬盘上的电脑中打开一个文件到 atmel studio 中。读取文件不是我程序的一部分,但我需要读取这个文件
所以我用 Atmel C 编程已经有一段时间了,我已经习惯了所有 C 位操作,所以现在我想隐藏它。我想隐藏位操作,不仅是为了让我的代码更具可读性,也是为了在我们的硬件发生变化或我们制造新硬件时更容易维
Atmel 在他们的网站上声明: Atmel Studio 7 features seamless one-click import of projects created in the Arduin
偶尔会遇到意外中断,我的代码会卡在里面Dummy_Handler() 在 exceptions.c Atmel Studio 框架 (ASF)。我正在使用 Arduino Due 的 ATSAM3X8
我有一个 SAM4s Xplained,想使用 UART1,但找不到示例或帮助。我自己尝试过,但它不起作用。 到目前为止,这是我的代码: conf_uart.h #include "asf.h" //
由于某些设计要求,我需要在运行时更改 DMA 描述符。为了实现这一点,我遵循以下步骤: 中止 DMA channel 。 DMA 硬件然后将当前执行的描述符保存在 同一 DMA channel 的 w
关闭。这个问题不满足Stack Overflow guidelines .它目前不接受答案。 想改善这个问题吗?更新问题,使其成为 on-topic对于堆栈溢出。 6年前关闭。 Improve thi
我是 C 编程初学者,对以下代码有一些问题: 我的项目很简单:当输入 i2 高或 i3 高或 i4(模拟值) #include #include "iomacros.h" int main(void
美好的一天, 我正在使用 AtmelStudio 7 为 ATMega645A 编写固件。我正在启动一个本地化项目,需要在 16x2 字符显示屏上以 3 种不同的语言显示消息。现有的(英文消息)存储在
我有 MCU ATMega16,我正在做数字电压表。我想在液晶显示屏上显示十进制数。这是我的代码: #include #include #include "lcd.h" #include
我有以下枚举和结构: typedef enum reference{ AREF = 0, //External on AREF pin AVCC = true 4 in a bina
我正在尝试使用 Atmel (ATmega328P Xplained mini) 微处理器使用旋转编码器来控制从 0-9 计数的 7 段显示器的速度。我的问题是,每当我运行程序时,显示屏计数的速度越来
当我查看 Atmel 软件框架中的一些驱动程序实现时,我遇到了几种使用内存屏障的情况。 障碍定义: #define barrier() asm volatile("" ::: "memo
我试图在按下按钮后切换到被阻止的任务。基本上我希望 task_player1 在收到来自 task_ctrl 的信号量之前不执行任何操作。我给出信号量的方式是按下按钮。代码如下: #define B1
我是一名优秀的程序员,十分优秀!