Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
20645 Discussions

"TrustZone_Cortex-A9AC6" example does not run normally

Mohammed_Lami
Beginner
1,513 Views

Hi, I am struggling in running the ready-examples of the ARM development studio IDE. I demonstrate the "TrustZone_Cortex-A9AC6" example here.

I am using the following resources:

1) "ARM Cyclone V SoC FPGA development kit".

2) Licensed copy of the ARM development studio IDE version 2021.1.

3) Windows 10 OS.

4) JTAG connection between the FPGA kit and the PC.

Please also refer to the snapshots in the attached pdf file for more details.

According to the description provided with this example "readme.html", the system should display some text on the "Target Console" like "Hello from Normal world" and so on. However, nothing was displayed on the Target Console although the system was running without a clear reason.

Any advice please to handle this issue? thanks a lot.

0 Kudos
21 Replies
JingyangTeh
Employee
1,403 Views

Hi Mohammed_Lami


Did you use the debug configuration from the project it self?

The FVP connection should work as it is a simulation.

In my test run after connecting to the TrustZone_Cortex-A9_AC6-FVP in the Debug Control .

I click the green play button under the Debug Control and I could see the print out in the Target Console.



Below screenshots are the settings that are in debug configuration:




Regards

Jingyang, Teh


0 Kudos
Mohammed_Lami
Beginner
1,372 Views

Hi @JingyangTeh , many thanks for your response.

 

Yes, I used the debug configuration from the project it self.

 

The snapshots in your message didn't displayed (pls notice the snapshot below), this happened in Chrome and MS Edge browsers, can you please resend them (in word or pdf file) thanks a lot.

 

Mohammed_Lami_0-1657984606393.png

 

0 Kudos
JingyangTeh
Employee
1,347 Views

Hi Mohammed_Lami

 

Please find the screenshot in the pdf attached.

 

Could you try cleaning and rebuilding the project from scratch again?

 

I also noticed that the reset command keeps on hanging whenever I try to reset the project.

The workaround I did was to reconnect the debug connection to reset the project.

 

Regards

Jingyang, Teh

0 Kudos
Mohammed_Lami
Beginner
1,333 Views

Hi @JingyangTeh , thanks for your support

 

Unfortunately, the problem still happening.

I have noticed the error messages in the commands view while debugging the project, I think there is a mismatch between the memory addresses in the scatter.scat files and the memory addresses of the board that I use (Altera cyclone V dev kit), and therefore the DS software couldn't find where is the memory on the board. Don't think this is the problem, if so, is it possible to modify the scatter files with the correct addresses? And what is the base RAM addresses for this kit?

 

Another point please, do you think that the dip switches of the kit may cause such problem, my board is initialized and the LCD displays a "No IP obtained" and "Hello Tim!" messages before I start debugging the project.

 

Thanks a lot for your support

 

------------------------------ Error messages in the commands view ------------------------

 

Stopping running target Intel SoC FPGA - Cyclone V SoC (Single Core) on connection
Connected to running target Intel SoC FPGA - Cyclone V SoC (Single Core)
Execution stopped in ABT mode at S:0x3FF78010
S:0x3FF78010 MOV r8,r0
cd "C:\Users\Mohammed Lami\Development Studio Workspace"
Working directory "C:\Users\Mohammed Lami\Development Studio Workspace"
Execution stopped in ABT mode at S:0x3FF78010
S:0x3FF78010 MOV r8,r0
source /v "C:\Program Files\Arm\Development Studio 2021.1\sw\debugger\configdb\Scripts\altera_target_check.py"

No SYSID registers could be found. Has a peripheral description file been supplied?

loadfile "C:\Users\Mohammed Lami\Development Studio Workspace\TrustZone_Cortex-A9_AC6\TrustZone_Cortex-A9_AC6.axf"
Target Message: Memory access caused precise abort.
Debug Precise Abort Registers : DFSR = 0x00001808, DFAR = 0x80000000
ERROR(CMD16-TAD274-NAL18):
! Failed to load "TrustZone_Cortex-A9_AC6.axf"
! Failed to write 4,872 bytes to address S:0x80000000 while writing block of 4,096 bytes to address S:0x80000000
! Bus error on memory operation.
set debug-from *$ENTRYPOINT
start
WARNING(CMD399-CMD38-CMD722):
! Failed to start the target
! The string "$ENTRYPOINT" cannot be interpreted as a positive int
! Entry point not set
WARNING(CMD407): Trying the entry point instead
ERROR(CMD426): Cannot find symbol to start or entrypoint, the file or load commands may be used to set the entrypoint
wait
add-symbol-file "${workspace_loc:/TrustZone_Cortex-A9_AC6/normal.axf}" N:0
Semihosting server socket created at port 8000
Semihosting enabled automatically due to semihosting symbol detected in image 'normal.axf'
wait
continue

-----------------------------------------------------------------------------------------------------------------------------------------------

0 Kudos
JingyangTeh
Employee
1,324 Views

Hi Mohammed_Lami


Could you give me some more time to research more about this TrustZone as I am not too familiar with it.

I will get back to you as soon as possible.


Regards

Jingyang, Teh


0 Kudos
Mohammed_Lami
Beginner
1,315 Views

Hi @JingyangTeh 

 

Please take your time, and thanks for your support

 

BTW, the problem happens with other projects that suit my FPGA board (Cyclone V SoC FPGA development kit).

 

For example, same error messages appear with the "startup_Cortex-A9_AC6" project.

 

Thank you very much

 

regards

Mohammed Lami

0 Kudos
JingyangTeh
Employee
1,299 Views

Hi Mohammed_Lami


Could you please refer to this link on setting the scatter file.

To launch the project from the on-chip ram, you could follow the link below:

https://www.intel.com/content/www/us/en/docs/programmable/683211/current/create-new-scatter-file-to-locate-the.html


Else if you would like to launch the project from the SDRAM, you could follow the link below:

https://www.intel.com/content/www/us/en/docs/programmable/683211/current/create-a-new-scatter-file-to-locate.html



Regards

Jingyang, Teh




0 Kudos
Mohammed_Lami
Beginner
1,283 Views

Hi @JingyangTeh 

Many thanks for your support

I followed the two documents that you shared and unfortunately multiple errors were generated, I think these documents belong to the old version of Development Studio (DS5), which is not applicable to the new version that I am using right now (21.1). Are there similar documents for the newer versions of the DS please?

However, it seems that I got a successful startup for the board in the supervisory mode (SVC), the "startup_Cortex-A9_AC6" has been cleaned and rebuild, without modifying the scatter file, then I debug it in FVP mode, all messages in the commands view were normal and the data was loaded successfully, please check the messages below.

The project was imported from the archived projects, I only exchanged the "C-code" in the "sort.c" file with a simpler one, the code should return the value of a variable, but after the successful startup and clicking on the the "run" button, nothing was displayed in the Target console or in the App console.

Anyway, I attached the "startup_Cortex-A9_AC6" project here (with the modified "sort.c" file), could you please check it for me, thanks again for your support.

 

-------------- messages in the commands view --------------------------

Stopping running target Intel SoC FPGA - Cyclone V SoC (Dual Core) on connection
Connected to running target Intel SoC FPGA - Cyclone V SoC (Dual Core)
Execution stopped in SVC mode at S:0x8001E5C8
S:0x8001E5C8 MOV pc,lr
cd "C:\Users\Mohammed Lami\Development Studio Workspace"
Working directory "C:\Users\Mohammed Lami\Development Studio Workspace"
Execution stopped in SVC mode at S:0x8001E5C8
S:0x8001E5C8 MOV pc,lr
source /v "C:\Program Files\Arm\Development Studio 2021.1\sw\debugger\configdb\Scripts\altera_target_check.py"

No SYSID registers could be found. Has a peripheral description file been supplied?

loadfile "C:\Users\Mohammed Lami\Development Studio Workspace\startup_Cortex-A9_AC6\startup_Cortex-A9_AC6.axf"
Loaded section VECTORS: S:0x80000000 ~ S:0x80000233 (size 0x234)
Loaded section RO_CODE: S:0x80000234 ~ S:0x800028D7 (size 0x26A4)
Loaded section RO_DATA: S:0x800028D8 ~ S:0x80002B0F (size 0x238)
Loaded section RW_DATA: S:0x80002B10 ~ S:0x80002B1B (size 0xC)
Entry point S:0x80000000
Semihosting server socket created at port 8000
Semihosting enabled automatically due to semihosting symbol detected in image 'startup_Cortex-A9_AC6.axf'
set debug-from *$ENTRYPOINT
start
Starting target with image C:\Users\Mohammed Lami\Development Studio Workspace\startup_Cortex-A9_AC6\startup_Cortex-A9_AC6.axf
Running from entry point
wait
Execution stopped in SVC mode at S:0x80000000
In startup.S
S:0x80000000 43,0 LDR PC, Reset_Addr
wait
continue

-------------------------------------------------------------------------------------------------------------------------------

0 Kudos
JingyangTeh
Employee
1,224 Views

Hi Mohammad_lami

 

Could you try removing the vector portion in the scat file?

I see that vector table in the startup.s is not set up to point to any portion in the code.

By removing the vector table we could start directly to the code.

 

 

2022-08-03_17h31_25.png

 

Regards

Jingyang, Teh

 

 

 

0 Kudos
Mohammed_Lami
Beginner
1,181 Views

Hi @JingyangTeh , thanks for your suggestion

 

I removed the vector portion in the scatter file according to your suggestion, but I got the errors shown below when I tried to build the project, any suggestion please?

 

------------ Errors after building the project -----------------------------------------------

 

01:03:34 **** Build of configuration Debug for project startup_Cortex-A9_AC6 ****
make all
'Building file: ../sorts.c'
'Invoking: Arm C Compiler 6'
armclang --target=arm-arm-none-eabi -mcpu=cortex-a9 -mfpu=neon-fp16 -mfloat-abi=hard -marm -O0 -g -MD -MP -c -o "sorts.o" "../sorts.c"
'Finished building: ../sorts.c'
' '
'Building file: ../startup.S'
'Invoking: Arm Assembler 6'
armclang.exe --target=arm-arm-none-eabi -mcpu=cortex-a9 -mfpu=neon-fp16 -mfloat-abi=hard -marm -g -c -o "startup.o" "../startup.S"
'Finished building: ../startup.S'
' '
'Building target: ../startup_Cortex-A9_AC6.axf'
'Invoking: Arm Linker 6'
armlink.exe --entry=Vectors --scatter="../scatter.scat" --info=sizes -o "../startup_Cortex-A9_AC6.axf" ./sorts.o ./startup.o
Error: L6218E: Undefined symbol Image$$VECTORS$$Base (referred from startup.o).
Finished: 0 information, 0 warning and 1 error messages.
make: *** [makefile:31: ../startup_Cortex-A9_AC6.axf] Error 1
"make all" terminated with exit code 2. Build might be incomplete.

01:03:42 Build Failed. 2 errors, 0 warnings. (took 8s.186ms)

0 Kudos
Mohammed_Lami
Beginner
1,177 Views

Hi @JingyangTeh 

 

Also, I tried to run the project (with the vector) in steps to see where is the problem, I got the following error in the command view and Disassembly view, apparently, the system couldn't access the two addresses 0x80000068 and 0x8000006C. For your information and support please.

 

------------------- Error in the Disassembly view --------------------------

Mohammed_Lami_0-1659740142870.png

 

---------------- Error in the command view ------------------------

ERROR(CMD440-TAD10-NAL18):
! Stepping failed
! Failed to read 4 bytes from address S:0x8000006C
! Bus error on memory operation.
Target Message: Memory access caused precise abort.
Debug Precise Abort Registers : DFSR = 0x00001008, DFAR = 0x80000000
Target Message: Memory access caused precise abort.
Debug Precise Abort Registers : DFSR = 0x00001008, DFAR = 0x80000068
Target Message: Memory access caused precise abort.
Debug Precise Abort Registers : DFSR = 0x00001008, DFAR = 0x8000006C

0 Kudos
JingyangTeh
Employee
1,153 Views

Hi Mohammed_Lami


Is it possible to run it without the debugger?

Could we try running it from a later address instead of starting from 0x8000006C?


Regards

Jingyang, Teh


0 Kudos
Mohammed_Lami
Beginner
1,146 Views

Hi @JingyangTeh , thanks for your response

 

Actually, I tried to run it after shifting to 0x80000100, i.e. after 0x8000006C address, but the same problem happened at 0x80000106.

 

Please JingyangTeh, could you please confirm the following point:

1) The license that I am using was provided by the provider in the link below, and I think it is "silver license", is this type has some limitations that cause such problem?

https://www.mouser.co.uk/ProductDetail/Intel-Altera/ESW-DS-FIX?qs=GedFDFLaBXHRCPCuFYREfg%3D%3D#

 

2) The version of the Development Studio is Intel Edition 2021.1 as I mentioned previously, my license support only ARM compiler 6, is there some limitations come from the compiler?

 

3) I noticed that my license doesn't support the project that used ARMv8 instruction set architecture, it works with ARMv7 and below only, is there any issue with this point that can cause such problem?

 

4) The hardware that I use is ARM Cyclone V SoC Development Kit; if you recheck the error message that I sent in my last post "! Bus error on memory operation.", does this message mean that the problem in the bus between the memory and the A9 core not the memory itself? If so, which factors may affect that bus, is it possible to investigate this point please?

 

5) Regarding the ARM Cyclone V SoC Development Kit, it has different jumpers and dip switches that configure different things of the board, is the dip switch configuration that may affect such problem? For example, there are switches that determine the boot type.

 

6) When I power on the board, the LCD on it shows "No IP address is obtained" and "Hello Tim!" messages in two lines, isn't that mean Linux operation system has been loaded? If so, do you think this is normal?

 

Please if you have any other advice and suggestions will be appreciated.

 

Regards

Mohammed Lami

0 Kudos
JingyangTeh
Employee
1,135 Views

Hi Mohammed_lami


Sorry that I am not familiar with the DS licensing limitation.

However you can find my response to question 4 ,5 & 6 below:


4) The hardware that I use is ARM Cyclone V SoC Development Kit; if you recheck the error message that I sent in my last post "! Bus error on memory operation.", does this message mean that the problem in the bus between the memory and the A9 core not the memory itself? If so, which factors may affect that bus, is it possible to investigate this point please?

I do not think it is a problem between the memory and A9 core. The error is due to it is trying to access an invalid memory address.

 

5) Regarding the ARM Cyclone V SoC Development Kit, it has different jumpers and dip switches that configure different things of the board, is the dip switch configuration that may affect such problem? For example, there are switches that determine the boot type.


You could find the switches state from the document here

https://cdrdv2.intel.com/v1/dl/getContent/653920?explicitVersion=true&wapkw=Cyclone%C2%AE%20V%20SoC%20Development%20Kit%20User%20Guide%20(PDF)%20%E2%80%BA

The boot type you are referring to is to determine the boot source for the board. (ie sdcard, qspi)

 

6) When I power on the board, the LCD on it shows "No IP address is obtained" and "Hello Tim!" messages in two lines, isn't that mean Linux operation system has been loaded? If so, do you think this is normal?

It seems like the linux operating system is loaded. It is not normal.

When you flash the example image did you also flash the pre-loader too?

https://www.intel.com/content/www/us/en/docs/programmable/683211/current/preloader.html


I would suggest trying out the example in the document on bare metal:

https://www.intel.com/content/www/us/en/docs/programmable/683211/current/bare-metal-user-guide.html



Regards

Jingyang, Teh


0 Kudos
Mohammed_Lami
Beginner
1,119 Views

Hi @JingyangTeh , thanks for your response

 

Regarding your question "When you flash the example image did you also flash the pre-loader too?"

No, I don't flash the pre-loader, I usually only the files .axf file that generated after building the project.

The document you proposed, suggests in point 5 load the u-boot-spl.bin to the board:

Mohammed_Lami_1-1660114763315.png

This file is available only in the DS-5 and lower versions.

But it is not included in the DS Intel Edition 2021.1 that I use, it is really confusing! Any suggestion please? Why there is no documents for the newer versions of DS software?

Mohammed_Lami_0-1660114656428.png

 

0 Kudos
JingyangTeh
Employee
1,080 Views

Hi Mohammed_Lami


Unfortunately there is no documentation for DS6.

However there is a small documentation for DS in RocketBoard.

https://rocketboards.org/foswiki/Documentation/SoCEDS#Cyclone_V_Bare_Metal_Example_Using_SoC_EDS_Standard_Edition


Regards

Jingyang, Teh


0 Kudos
JingyangTeh
Employee
1,040 Views

Hi Mohammed_Lami


Any update on this case?


Regards

Jingyang, Teh


0 Kudos
Mohammed_Lami
Beginner
1,020 Views

hI @JingyangTeh 

 

I tested all the solutions in my mind, available web documents and webpages and the solutions provided by your side, but the problem still exist.

What should I do in this case please?

Any other ideas please?

0 Kudos
JingyangTeh
Employee
1,006 Views

Hi Mohammed_lami


Have you tried the bare metal example in Rocketboard?

Is it working with the example ?


Regards

Jingyang, Teh


0 Kudos
Mohammed_Lami
Beginner
966 Views

Hi @JingyangTeh , thanks for your response

 

I have bought the "ARM Cyclone V SoC FPGA development kit" and a licensed copy of Intel DS software, and I tested all the available bare metal examples but they were not working as I explained in details previously. Actually I don't have an idea about what's going on although I followed all your suggestions, if you need more data to let you understand the situation, please let me know. Alternatively, if there is another way to get support from Intel, please let me know.

 

Your support is appreciated

 

Regards

Mohammed Lami

 

0 Kudos
Reply