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

Keep comments in preprocessor i file

We want to use the preprocessor output file (.i file ) for further use, especially the comments. For that, we use the /PREPRINT (or /PP) command line switch. The problem is that the KEIL compiler (C166) deletes any comments. Q: Is it possible to…
joe
  • 8,344
  • 9
  • 54
  • 80
9
votes
3 answers

Any function instead of sprintf() in C? code size is too big after compile

I am working on developing an embedded system (Cortex M3). For sending some data from the device to the serial port (to show on a PC screen), I use some own functions using putchar() method. When I want to send integer or float, I use sprintf() in…
Django
  • 159
  • 1
  • 3
  • 9
8
votes
2 answers

How do I access local C variable in arm inline assembly?

I want to access local variable declared in C in inline arm Assembly. How do I do that? Global variables can be accessed like this, int temp = 0; Function(){ __asm( ".global temp\n\t" "LDR R2, =temp\n\t" …
Muzahir Hussain
  • 1,009
  • 2
  • 16
  • 35
8
votes
3 answers

How to relocate vector table and change starting addressin cortexm3 using uvision(Keil)?

I'm using a STM32F107 cortex m3 microcontroller. I'm using the Keil uvision IDE for the project. I have an application which is running properly at the starting location i.e 0x0800 0000. If I change the starting location to 0x0800 4000 the…
suraj
  • 283
  • 3
  • 5
  • 13
7
votes
1 answer

Delay in HAL Library (HAL_Delay())

I'm trying to blink LEDs on my STM32F4 Discovery. Somehow it's stuck on the delay function. I have changed the SysTick interrupt priority to 0 and added the IncTick(), GetTick() functions. What am I missing? #include "stm32f4xx.h" // Device…
Reactionic
  • 182
  • 1
  • 2
  • 12
7
votes
2 answers

Place segments of external static library to specific locations

My application calls some functions which are placed in an external static library. I link the external static library to my application and everything works (in this case I'm using GCC). Nevertheless, the locations (addresses) of text, .data and…
HBv6
  • 3,487
  • 4
  • 30
  • 43
7
votes
4 answers

How do I execute a function from RAM on a Cortex-M3 (STM32)?

I'm trying to execute a function from RAM on a Cortex-M3 processor (STM32). The function erases the and rewrites the internal flash, so i definitely needs to be in RAM but how do I do that? What I have tried is this: Copy the function to a byte…
c0m4
  • 4,343
  • 10
  • 35
  • 40
7
votes
5 answers

What is non-aligned access? (ARM/Keil)

I'm using Keil to write Assembly for ARM 7. I have the following runtime error: Non-aligned Access: ARM Instruction at 000000F8H, Memory Access at 7F7F7F7FH Data Abort: ARM Instruction at 000000F8H, Memory Access at 7F7F7F7FH This doesn't really…
OJFord
  • 10,522
  • 8
  • 64
  • 98
6
votes
1 answer

What's the structure of .arm.extab entry in armcc?

I'm trying to understand exactly how the exception table (.arm.extab) works. I'm aware that this is compiler dependent, so I'll restrict myself to armcc (as I'm using Keil). A typical entry in the table looks something like: b0aa0380 2a002c00…
Tal Ben-Porath
  • 135
  • 1
  • 5
6
votes
1 answer

Can't get STM32F103RB usart1 to communicate with hc-05

I am unable to connect USART_1 with bluetooth hc-05. The Microcontroller is STM32F103RB. Here's the code (I am not using any library) #define APB2_FREQ 72000000 void USART1_Send(char* data) { unsigned int length = 0; while(data[length]…
Muzahir Hussain
  • 1,009
  • 2
  • 16
  • 35
6
votes
2 answers

gcc -Wall introduces compiler error

I'm trying to use gcc compiler in Keil IDE for stm32f103 microcontroller. I'm compiling a relatively small project with a bit of template code and a couple of pure virtual classes. No fancy C++11 stuff. So far so good. When I compile with -w or…
Amomum
  • 6,217
  • 8
  • 34
  • 62
6
votes
2 answers

error: #29: expected an expression in C

my code contains #define READ_TAMPER_PIN() {((FIO2PIN & PIN_TAMPER) >> 12) ;} where PIN_TAMPER is again a macro- #define PIN_TAMPER 0x00001000; in one of the header file, and it is called in main() like x = READ_TAMPER_PIN(); it gives an…
YMJ
  • 154
  • 1
  • 2
  • 7
6
votes
1 answer

Show printf messages in IDE during debug

We have a device and I'd like to use printf function to send messages to the IDE for debugging purposes. The setup: ARM Cortex-M3 device ULINK2 interface uVision4 IDE I've followed the instructions available in this link to be able to see the…
Arthur Nunes
  • 6,718
  • 7
  • 33
  • 46
5
votes
1 answer

Is there anybody using Keil MDK on Linux through wine?

I've been having trouble using keil MDK on ubuntu 18.04. After doing a couple of trial I am able to use uVision IDE of keil on my ubuntu os. Everything working fine but while trying to program my mcu it shows "No ST-Link Found". But as I insisted to…
Naasif
  • 495
  • 2
  • 6
  • 13
5
votes
3 answers

Difference between global variables and variables declared in main in ARM C

I've been trying to use C in Keil to write some test code for my TM4C123G, which uses an ARM microcontroller. I have no clue about ARM assembly, but I have written some assembly code for an AVR microcontroller in the past. Where are the values of…
codingEnthusiast
  • 3,800
  • 2
  • 25
  • 37
1
2
3
54 55