Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[ARM] Atmel studio compiler issues with SAMG55 microcontroller

Status
Not open for further replies.

yazenalali

Newbie level 3
Joined
Aug 31, 2016
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
51
Hi All,
I have worked with Atmel microcontrollers before and it was a nice experience. Recently I got a SAMG55 XplainedPro Kit with the ATSAMG55J19A (Cortex-M4 core) on it and started programming the kit using the atmel studio 7.0 compiler.
I am running an executable project code and until now I am dealing with three main issues from the compiler and to proceed with our project I need a solution for these problems as soon as possible:
1- When running any code the compiler sets the stack pointer after the global variables address in the SRAM instead of putting it at the end address of the SRAM which will make data overlapping in the SRAM when using functions and local variables in any code, for example take a look at this code:
Note: The starting address of SRAM is 0x20000000 and the end address is 0x20028000
char test[100];
int main()
{
........some code
function();
}

void function()
{
char fun[100];
........some code
}
The compiler must set the stack pointer at the end address of SRAM, instead in this case it is addressed at 0x20000084, so when a function is called and a stack memory is created it will overlap with the global variables and unexpected data is saved inside all variables?
2- In my project I need to use the FPU unit to reduce time computations, so we enabled in the program, but the compiler still translating any floating point operation to an ordinary instructions in assembly which will use the core to execute it not the FPU unit. How could I let the compiler translate them to floating point instructions to let them be executed by the FPU unit?
3- Last issue is the optimization options, see below image:
Untitled.png
Here if I run a code which has some lines and functions even without any variables it directly goes and stuck to the dummy_handler service routine, otherwise if I put this option to (none) it works without going to that handler. my question here is how to run a code with the optimize option selected since it does increase the speed of operation and reduce size of code as explained?
Sorry for the long explanations, but I am stuck and need some help?
Thanks,
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top