This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

CortexM3

I have a very simple CortexM3 based virtual platform example as below

The amba_pv_m2 is connected to a memory in the top. The BusDecoder master port address range is 0x0-0x3FFFFFFF

I have the following C program

#include <stdio.h>

int main(int argc, char *argv[])
{
    printf("Hello!!!\n");
    return 0;
}

and the following make commands

armcc --cpu=Cortex-M3 -g -O2 -c -o hello.o hello.c
armlink --cpu=Cortex-M3 --ro-base 0x00000000  -o hello.axf hello.o

With that when I load the axf into the core and execute, I see the Hello is printed.

Bow I want to load the SW at 0x40000000. For that I did the following chnages

- BusDecoder master port address range 0x40000000-0x7FFFFFFF and make command as

armcc --cpu=Cortex-M3 -g -O2 -c -o hello.o hello.c
armlink --cpu=Cortex-M3 --ro-base 0x40000000  -o hello.axf hello.o

with that the when I run the platform, it stucks somewhere and I am not getting the Hello output.

It seems I am missing some thing here.

Can you guys help me on this ?

Thanks

Khushi

Parents
  • In addition to the excellent advice already given, you might want to consider getting a decent textbook to help you to properly understand the Cortex M3 architecture?

    Joseph Yiu's book "The Definitive Guide to Arm Cortex M3 and Cortex M4 Processors" is a popular choice is highly recommended by many.

    Another excellent book for beginners is Daniele Lacamera's book "Embedded Systems Architecture" (published by Packt in 2018) since this has chapters describing the boot process and memory layout for Arm-v8M MCUs. You can often get ebook versions of Packt books from their website  for as little as $10 (or even free) so it is worth taking a look to see if there is anything else that might help you get started.

Reply
  • In addition to the excellent advice already given, you might want to consider getting a decent textbook to help you to properly understand the Cortex M3 architecture?

    Joseph Yiu's book "The Definitive Guide to Arm Cortex M3 and Cortex M4 Processors" is a popular choice is highly recommended by many.

    Another excellent book for beginners is Daniele Lacamera's book "Embedded Systems Architecture" (published by Packt in 2018) since this has chapters describing the boot process and memory layout for Arm-v8M MCUs. You can often get ebook versions of Packt books from their website  for as little as $10 (or even free) so it is worth taking a look to see if there is anything else that might help you get started.

Children
No data