Can one run a custom c-application in the Arm TrustZone (especially using VSCode)?

Hi, here in the documentation (https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/config_and_build/board_support/processing_environments.html) for the latest nRF Connect SDK it says:
"The application is built as a non-secure image and Trusted Firmware-M (TF-M) is built as the secure image. The build system merges both images to form a combined image that will be used for programming or updating the device.
TF-M enables hardware-supported separation of firmware. It also implements Platform Security Architecture (PSA) API, which provides security features for the system, including roots of trust for protecting secrets, platform state, and cryptographic keys. The API coordinates the communication with the components in NSPE."
So this currently sounds to me like the secure image is Trusted Firmware-M and is not written by the user (can be interacted with through an API only), or?

However I have code of two applications written in c, one of which should run in the secure world while the other runs in the non-secure world and calls functions of the application running in the secure world. (I use an Nordic Semi nRF9161.)

Is it als possible/supported to run custom code/a custom application in the secure world (= inside TrustZone)?

And I use Visual Studio Code with the nRF Connect extension etc and can run a simple single application on the board. However how can you configure the VS-Code nrf-Connect-extension to use some files for the secure application and some files for the non-secure application (if that's possible)?

Thanks for any help

Related