Questions tagged [keil]

Keil IDE and compiler tools for ARM and other embedded microcontrollers. This includes: ARM Development Tools C166 Development Tools C51 Development Tools C251 Development Tools Debug Adapters Evaluation Boards

Keil IDE and compiler tools for ARM and other embedded microcontrollers.

The Keil IDE includes:

  • ARM Development Tools
  • C166 Development Tools
  • C51 Development Tools
  • C251 Development Tools
  • Debug Adapters
  • Evaluation Boards

More information is available at http://www.keil.com/

818 questions
3
votes
3 answers

Where are Cortex-specific functions like __wfi() defined in Keil?

I'm working on an industrial code for Cortex-M0 controller, using uVision Keil 4.71.0.0 IDE. Our code is supposed to respect MISRA rules and is routinely checked with QA-C. My problem is that some controller-specific functions like __wfi(),…
Dmitry Grigoryev
  • 3,156
  • 1
  • 25
  • 53
3
votes
1 answer

STR instruction in ARM assembly doesn't work (using KEIL)

I'm trying to store a value in memory. my code is here: TTL TEST global main AREA PROGRAM, CODE, READONLY ENTRY main ADR R0, DATA MOV R1, #5 STR R1, [R0] HALT B …
01000110
  • 282
  • 1
  • 3
  • 16
3
votes
2 answers

AREA Field in ARM Assembly

Hi I'm using the Keil uVision compiler for ARM assembly. I'm just starting out learning this and I have the following code in my program. AREA PROGRAM, CODE, READONLY EXPORT SYSTEMINIT EXPORT __MAIN SYSTEMINIT __MAIN MOV R1, #0X25 MOV R2,…
HarvP
  • 190
  • 3
  • 13
3
votes
1 answer

static variables in switch statements

I am working on a keil project using c. In one of my files, I have defined some variables at the top as static. I use them in some functions in this file and I also use them in a switch/case statement. For example: at the top where variables are…
Dude
  • 261
  • 2
  • 5
  • 14
3
votes
1 answer

Anonymous namespace causes undefined reference here - works there

I've written some C++ code for an embedded system which works like a charm. The current task is to emulate the behaviour of this device on a PC. Some of the code has to be ported: For a first test I'm using mingw (g++) while the Embedded system is…
clambake
  • 772
  • 4
  • 15
3
votes
3 answers

How to create a delay function in Keil uVision?

Arduino has a delay(ms) function to pause the program for a certain amount of time. It is very accurate in milliseconds. I have a delay function in C used in Keil uVision for the AT89C5131 microcontroller: void delay( unsigned long duration) { …
Yi Xu Chee
  • 67
  • 1
  • 1
  • 13
3
votes
2 answers

Is there a way to build arm project with no keil but some script?

recently i'm working on some project with arm but no OS in it. Now when i compile it, i must open keil. but keil is weak in edit, so i'm considering to write a script to execute complier of keil, to build the project. but i know little about keil,…
sillypenguin
  • 129
  • 2
  • 7
3
votes
1 answer

Macro for function declaration not working

I want to use a macro in order to easily change a function declaration, here is what I have for now : #define MYDECLARATION(name) void name (void) When I call MYDECLARATION(my_thread); I get an error: identifier-list paramters may only be used…
Joze
  • 1,285
  • 4
  • 19
  • 33
3
votes
2 answers

Access an inline function from another file

I am currently coding in C with keil compiler. I am facing an issue I have to use inline function (performance matter in my case so I have to use it) and I have a file which contains an inline function. This inline function is declared in the header…
Joze
  • 1,285
  • 4
  • 19
  • 33
3
votes
2 answers

Keil uVision (C51 compiler), what is meaning of unary operator "!"?

I'm programming with Keil uVision 4. I have some code like this: sbit X = P3 ^ 3; // X is third bit of P3 register ... while (1) { X = !X; // X equals not X ?! if (X == 0) printf("0"); else printf("1"); …
Filippo Lauria
  • 1,965
  • 14
  • 20
3
votes
1 answer

compiler warning on setting 32nd bit

I have compiler warning in code while setting 32nd bit. Code works but this warning annoys me. Compiler is Keil C, processor is 32 bit ARM. Code is as following PINSEL0 |= PINSEL_AD15; where PINSEL0 is 32 bit register, defined as #define PINSEL0 …
Gossamer
  • 309
  • 2
  • 16
3
votes
3 answers

Initializing struct using designated initializer in embedded C. "Expected an expression"

I am trying to initialize a struct, and assign values to the struct variables. My struct: typedef struct { q31_t A0; q31_t A1; q31_t A2; q31_t State[3]; q31_t Kp; q31_t Ki; q31_t Kd; }…
Jeffa
  • 123
  • 1
  • 2
  • 7
3
votes
4 answers

How to run a CruiseControl task as an administrator in Windows Server 2008

I'm currently using CruiseControl.NET to automate my build. We have two different ways to build a solution in my build environment - one is through the Keil uVision4 IDE, the other is through Visual Studio 2008. I've successfully gotten the Visual…
CrimsonX
  • 9,048
  • 9
  • 41
  • 52
2
votes
4 answers

"Could not stop Cortex-M device" error when attempting to debug STM32F205ZG

I am having trouble running the debugger on a STM32F205ZG using µVision4 and the ULINK2. I keep getting the error message "Could not stop Cortex-M device! Please check the JTAG cable." I am using the SW port. Any help with this would be greatly…
goodman
  • 127
  • 1
  • 4
  • 13
2
votes
2 answers

STM32: non-initialized variables?

using the uvision IDE for STM32 development, I want to have some timer variables not initialized at startup. I have tried: volatile unsigned int system_time __attribute__((section(".noinit"))); and __attribute__((zero_init)) volatile int…
TRPV4
  • 51
  • 1
  • 3