标签: arm9

ARM9上的valgrind?

我看到valgrind有一个ARM7目标,但我发现有关valgrind是否支持ARM9的相互矛盾的信息.我正在使用的ARM9目标是运行linux.

有没有人专门成功地在ARM9目标上使用valgrind?如果是这样,你可以提供的任何指针都会有所帮助,包括"你是如何构建它的?".

谢谢

-z

valgrind arm embedded-linux arm9

8
推荐指数
1
解决办法
4894
查看次数

基于ARM的嵌入式Linux上的GPIO IRQ

我正在尝试在AT91SAM9M10-EKES评估板上编程GPIO IRQ.我成功注册了IRQ,IRQ正在运行.但是,有些中断被遗漏了.我送26,而我只得到22.

代码:

static irqreturn_t wiegand_interrupt(int irq, void *dev_id){
  atomic_inc(&counter);
  printk(KERN_WARNING "IRQ recieved, counting... %d\n",atomic_read(&counter));
  return 0;
}
irq1 = gpio_to_irq(AT91_PIN_PA21);
if (irq1 < 0) {
    err = irq1;
    printk("Unable to get irq number for GPIO %d, error %d\n",AT91_PIN_PA21, err);
    goto fail;
}

err = request_irq(irq1,wiegand_interrupt,0 ,"wiegand",NULL);

irq2 = gpio_to_irq(AT91_PIN_PA20);
if (irq2 < 0) {
    err = irq2;
    printk("Unable to get irq number for GPIO %d, error %d\n",AT91_PIN_PA21, err);
    goto fail;
}

err = request_irq(irq2,wiegand_interrupt,0 ,"wiegand",NULL);
Run Code Online (Sandbox Code Playgroud)

这不是整个驱动程序,但这是处理IRQ的实际部分.如果有人在代码中发现问题,或者可以建议一种方法来了解我失去4个中断的原因,请回复.我被困在这几个小时...... :(

谢谢.拉蒙.

irq linux-device-driver embedded-linux gpio arm9

5
推荐指数
1
解决办法
5013
查看次数

结构对齐安全使用

我是一家新公司,在这家公司中完成了以下结构的使用:

#include <stdio.h>
#include <string.h>

typedef unsigned char uint8;
typedef signed char int8;
typedef unsigned short int uint16;
typedef signed short int int16;

typedef struct padded_t {
    int8 array0[11];
    int8 array1[4];
    uint16 len2;
    int8 array2[25];
    uint16 len3;
    int8 array3[6];
    // many more len/arrays follow
} padded_t;

int main(int argc, char** argv)
{
    padded_t foo;
    memset((void*)&foo, 0, sizeof(padded_t));

    int8* str = "foobar";
    int16 size = (int16)strlen(str);

    int8* ptr = (int8*)&foo.len2;

    // please note that the memcpy references only the pointer to …
Run Code Online (Sandbox Code Playgroud)

c struct c99 arm9 struct-member-alignment

5
推荐指数
1
解决办法
148
查看次数

需要有关为WinCE,ARM9使用Inline Assembly的信息

我不太擅长内联汇编,但计划在嵌入式项目中将其用于优化目的.由于我不太了解有关它的信息,我需要一些帮助.

我正在使用MS Visual Studio 2005(使用MFC)与ARM9一起使用Win CE 6.0.

基本上,我想更快地进行内存访问,并进行一些按位操作.

如果我可以获得任何在线链接,或者为我的特定环境使用寄存器,变量名,指针(一些内存传输和按位操作相关的东西)等的一些示例,对我来说真的很有帮助.

在ctacke回答之后编辑:

如果有任何链接或小例子可以解决.s文件,特别是从.s编写​​和导出函数,以及涉及将它们与我的MFC应用程序相结合的步骤,对我来说真的很有帮助.任何小例子都可以做到.

谢谢.

亲切的问候,Aftab

embedded mfc inline-assembly windows-ce arm9

4
推荐指数
1
解决办法
895
查看次数