We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hello,
is it quite normal, that a arm9 microcontroller starts in the supervisor mode? How could I changed the mode into user mode? Or is it better to work in the supervisor mode?
I've only the startup file and a short main.c file
#include <stdio.h> int main(void) { while(1); }
In the startup file I only can see that every mode will be initialized.
best regards tobi
is it quite normal, that a arm9 microcontroller starts in the supervisor mode?
Well, it sort of has to. If it started in user mode, there wouldn't be a way to enter supervisor mode (because that's exactly what code running in user mode is not allowed to do). That's probably true for any processor that supports differen execution modes/rings.
Usually, you need to worry about switching modes when you're writing an operating system. If you're using an OS out of the box, then the OS will take care of that for you, provided that you stick to the documentation as far as OS startup and initialization goes.
thanks - I know why my arm processor started in supervisor mode... because of the options selected within keil.
Options for target -> Target: I've selected the internal RAM and the external RAM as default and under Options for target -> Linker: I write the R/0 base of my external flash and the R/W base of the internal RAM.
When I select "use memory layout from target dialog" the arm processor will start in user mode. But now, all kinds of variables will be installed in the external RAM. I only want to install huge arrays in the external RAM and small variables in the internal RAM - how is that possible to configure that?
tobi
I only want to install huge arrays in the external RAM and small variables in the internal RAM - how is that possible to configure that?
The linker is responsible for placing code and variables into the available memory space. The linker documentation describes how to make the linker place certain objects/files at certain positions in memory.
<quote>The linker is responsible for placing code and variables into the available memory space. The linker documentation describes how to make the linker place certain objects/files at certain positions in memory.<nedquote>
how doe swhen the linker run the code into the prosesser and the program in the chip? does it do the on lerft with describes how to make the linker place certain objec in superviso mode in 2007! can the keilpiler sound the error?