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
2
votes
2 answers

Force ARM compiler to issue an undefined macro error

Header file config.h contains the following statements: #define RED 0 #define BLUE 1 #define GREEN 2 #define CONFIG_COLOR RED Source file main.c does not include config.h but contains the following: #if CONFIG_COLOR == RED /* Red code */ #elif…
s7amuser
  • 827
  • 6
  • 18
2
votes
1 answer

adc order of conversion in stm32f103 in multichannel conversion

I am working on adc in stm32f103 controller in keil compiler in this adc, I need perform continuos conversion up to 6 channels...I need to program the order of conversion in adc1_sqrx. but I didn't found any hint how to program this order of…
Ganesh Kvvn
  • 41
  • 1
  • 5
2
votes
0 answers

Partial Linking in IAR for ARM for Hiding Symbols

I want to distribute a static library which consists of many source files and therefore, when compiled, consists of many object files. Within the object files there are some static functions and some functions which are not static. The non-static…
TomE
  • 345
  • 2
  • 13
2
votes
1 answer

Keil Uvision 5 adding header files and source files?

I started with an example project in keil from Nordic SDK. This question is not about the nordic sdk, but rather how Keil connects header files and source files. After what I can understand Keil hides all header files merged into the main.c file,…
Mattis Asp
  • 993
  • 3
  • 14
  • 29
2
votes
1 answer

SysTick Interrupt pending but won't execute, debug interrupt mask issue?

I've been trying to get a SysTick interrupt to work on a TM4C123GH6PM7. It's a cortex m4 based microcontroller. When using the Keil Debugger I can see that the Systick interrupt is pending int NVIC but it won't execute the handler. There are no…
MHilton
  • 221
  • 2
  • 9
2
votes
1 answer

Extern "C" constant value is not known in .cpp but works in .c

In C file // f1.c const uint8_t C_VAL=2;` In C++ file I declare simple array // f2.cpp extern "C" const uint8_t C_VAL; char charray[C_VAL]; Build output: #259: constant value is not known There was not any errors when I link extern in…
kyb
  • 7,233
  • 5
  • 52
  • 105
2
votes
2 answers

array [] vs pointer * - why will the first code fail in C?

I'm using a Keil C51 compiler to program a 8051 microcontroller. For some reason my code didn't run - I managed to track down the bug, but I still have difficulties understanding it. Why is the first code wrong, comparing to the other one? It's…
Suryu
  • 25
  • 1
  • 9
2
votes
1 answer

Variable value not updated by interrupt on STM32F4 Discovery

In the code below, I can see that the timer is working normally as the LED is always blinking. But the value of the count variable never changes inside the second while. I don't know what could possibly go wrong? // count variable used only in main…
Fico
  • 21
  • 2
2
votes
0 answers

How to build a Keil Uvision project via system() function, when the system() function is used in Qt creator?

I am able to build my project via the command prompt using: UV4 -b project_name.uvproj However, trying to execute the same with the system() function has been giving an error as shown below even after the path was specified: The system cannot find…
2
votes
1 answer

FRDM-KL25z assembly delay loop causes reset

I'm currently working on a project using the FRDM-KL25Z development board and programming using Keil MDK-lite (5.14a). What we're supposed to do is create a simple traffic light using three corresponding LEDs and a push button to expedite the light…
ns533
  • 301
  • 1
  • 4
  • 13
2
votes
0 answers

Simple Assembly Language doubts

I had worked out some code for my assignment and something tells me that I'm not doing it correctly.. Hope someone can take a look at it. Thank you! AREA Reset, CODE, READONLY ENTRY LDR r1, = 0x13579BA0 MOV r3, #0 MOV r4, #0 MOV …
2Xchampion
  • 666
  • 2
  • 10
  • 24
2
votes
2 answers

C sprintf breaks with byte parameters (Keil compiler)

I have code running in 2 projects/platforms. It works in one, not the other. Code is like this: uint8_t val = 1; uint8_t buff[16]; sprintf(buff, "%u", val); The expected output is "1" (gcc) but on one compiler (Keil) it returns "511", which in hex…
radsdau
  • 495
  • 5
  • 16
2
votes
0 answers

keil 4 and stm32f4discovery fpu not working

////// EDIT: SOLVED, read solution below I'm trying to use the fpu with the stm32f4Discovery board, programmed with Keil 4 (free version) but, when trying to use it, enters in an infinite loop. I don't know exactly why, I'm using a very simple code…
jmth
  • 41
  • 3
2
votes
0 answers

Big trouble while linking the code to nrf5144a

While I'm trying to compile my code, I got an error: ".\Objects\ble_firmware_v1.axf: Error: L6405E: No .ANY selector matches main.o(i.app_error_handler). " This error appeared at linking process. I don't know how to solve this error and why does…
2
votes
3 answers

Pointer parameter was set but never used warning

I have the following function: void foo(char *ptr_1) { char *ptr_2; bar(ptr_2); ptr_1 = ptr_2; } And get this warning: parameter "ptr_1" was set but never used I understand that the warning is technically true, but is irrelevant at…
andrey
  • 1,515
  • 5
  • 23
  • 39