lpc

ARM-C Inter-working

孤街醉人 提交于 2019-12-10 21:36:10
问题 I am trying out a simple program for ARM-C inter-working. Here is the code: #include<stdio.h> #include<stdlib.h> int Double(int a); extern int Start(void); int main(){ int result=0; printf("in C main\n"); result=Start(); printf("result=%d\n",result); return 0; } int Double(int a) { printf("inside double func_argument_value=%d\n",a); return (a*2); } The assembly file goes as- .syntax unified .cpu cortex-m3 .thumb .align .global Start .global Double .thumb_func Start: mov r10,lr mov r0,#42 bl

pass by reference in assembly

非 Y 不嫁゛ 提交于 2019-12-10 15:28:50
问题 I am trying to write a program to calculate the exponential of a number using ARM-C inter-working. I am using LPC1769(cortex m3) for debuuging. The following is the code: /*here is the main.c file*/ #include<stdio.h> #include<stdlib.h> extern int Start (void); extern int Exponentiatecore(int *m,int *n); void print(int i); int Exponentiate(int *m,int *n); int main() { Start(); return 0; } int Exponentiate(int *m,int *n) { if (*n==0) return 1; else { int result; result=Exponentiatecore(m,n);

USB Driver Installation Issue for Microcontroller using Custom INF

断了今生、忘了曾经 提交于 2019-12-10 10:17:06
问题 I'm working with the NXP LPC1788 microcontroller and I'm trying to create a driver on the host computer to communicate with it via USB. I believe that I've managed to get the device handling standard USB requests properly (the PC is able to read the string descriptors properly). I'm having trouble writing a sample USB driver and installing it for the device, though. I'm working with Microsoft Visual Studio 2013. My steps were: Creating a WinUSB Application, which produces a "Driver" and

USB Driver Installation Issue for Microcontroller using Custom INF

℡╲_俬逩灬. 提交于 2019-12-06 01:13:01
I'm working with the NXP LPC1788 microcontroller and I'm trying to create a driver on the host computer to communicate with it via USB. I believe that I've managed to get the device handling standard USB requests properly (the PC is able to read the string descriptors properly). I'm having trouble writing a sample USB driver and installing it for the device, though. I'm working with Microsoft Visual Studio 2013. My steps were: Creating a WinUSB Application, which produces a "Driver" and "Driver Package" project. Modifying the generated INF file to use my device's VID and PID. Building the

Storing CRC into an AXF/ELF file

青春壹個敷衍的年華 提交于 2019-11-30 21:22:01
I'm currently working on a C program in the LPCXpresso (eclipse-based) tool-chain on Windows 7, an IDE with gcc targeting the an NXP Cortex M3 microprocessor. It provides a simple way to compile-link-program the microprocessor over JTAG. The result of a build is an AXF file (ELF format) that is loaded by a debug configuration. The loaded program resides in Flash memory from 0x00000 to 0x3FFFB. I'd like to include a 4-byte CRC-32 at 0x3FFFC to validate the program at start-up. I added another section and use the gcc __attribute__ directive to access that memory location. uint32_t crc32_build _

Storing CRC into an AXF/ELF file

谁说胖子不能爱 提交于 2019-11-30 17:09:04
问题 I'm currently working on a C program in the LPCXpresso (eclipse-based) tool-chain on Windows 7, an IDE with gcc targeting the an NXP Cortex M3 microprocessor. It provides a simple way to compile-link-program the microprocessor over JTAG. The result of a build is an AXF file (ELF format) that is loaded by a debug configuration. The loaded program resides in Flash memory from 0x00000 to 0x3FFFB. I'd like to include a 4-byte CRC-32 at 0x3FFFC to validate the program at start-up. I added another