Skip to content

Adding default target-set#76

Merged
jkrech merged 2 commits into
mainfrom
simple_tz_target-set
Jun 15, 2026
Merged

Adding default target-set#76
jkrech merged 2 commits into
mainfrom
simple_tz_target-set

Conversation

@jkrech

@jkrech jkrech commented Jun 14, 2026

Copy link
Copy Markdown
Member

The default target-set

  • selects both secure and none-secure projects
  • configures the FVP model to run application via play button

The default target-set 
- selects both secure and none-secure projects
- configures the FVP model to run application via play button

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the SimpleTrustZone csolution configuration to define a default target-set for the AVH target type, intended to launch both secure and non-secure images under an Arm FVP model via the “play”/debugger configuration.

Changes:

  • Bumped the created-for CMSIS-Toolbox version metadata to 2.12.0.
  • Added a target-set for AVH that includes both CM33_ns.Debug and CM33_s.Debug images and an Arm-FVP debugger/model configuration.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread SimpleTrustZone/SimpleTZ.csolution.yml
@jkrech jkrech requested a review from brondani June 15, 2026 07:10
@jkrech

jkrech commented Jun 15, 2026

Copy link
Copy Markdown
Member Author

I noticed that when running the FVP model locally, that the test only passes if the axf files are loaded in a certain order:

NS before S
-a out/CM33_ns/AVH/Debug/CM33_ns.axf -a out/CM33_s/AVH/Debug/CM33_s.axf

output:

Jump to non-secure application at 0x0020155D
Non-secure application...
func1(1) = 4
func2(func3, 2) = 9

Executing task: FVP_MPS2_Cortex-M33 -f ../FVP/FVP_MPS2_Cortex-M33/fvp_config.txt --stat -a out/CM33_s/AVH/Debug/CM33_s.axf -a out/CM33_ns/AVH/Debug/CM33_ns.axf

output:

Non-secure application...
func1(1) = 4

Is it possible that this is due to the reset address from the last axf file winning?
Can we disable the reset value generation into the axf file?

@brondani brondani left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@brondani

brondani commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

Is it possible that this is due to the reset address from the last axf file winning?

Yes, it appears that the entry point from the last loaded AXF is the one used when execution starts. The importance of the entry point can be confirmed by keeping the non-secure application as the last -a argument and explicitly setting the PC to the secure reset handler, for example:

--start FVP_MPS2_Cortex_M33.cpu0=0x0000162d

Can we disable the reset value generation into the axf file?

The --entry linker option is set in cdefault.yml. If this option is not specified, armlink automatically includes the __main startup code from the C library [reference].
Removing the entry point may be technically possible but it sounds unusual.

Maybe @VladimirUmek has some insight into this, as concerns about image loading order have previously been raised for the Arm Debugger:
ARM-software/vscode-arm-debugger#17 (comment)

Reordered the project in the `projects:` node to ensure that the secure application is listed second and the run task for the FVP uses the "entry point" from the secure application.
@jkrech jkrech requested a review from brondani June 15, 2026 11:50
@jkrech

jkrech commented Jun 15, 2026

Copy link
Copy Markdown
Member Author

Reordering the *.cproject.yml files in the *.csolution.yml projects: node, ensures that the secure axf file is loaded second/last and ensures that the FVP uses the entry point from the secure application.

@jkrech jkrech merged commit 618cb62 into main Jun 15, 2026
2 checks passed
@jkrech jkrech deleted the simple_tz_target-set branch June 15, 2026 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants