Could you try turning off CONFIG_USERSPACE and/or provide a minimal test case that demonstrates the failure?
From: firstname.lastname@example.org <email@example.com> on behalf of Jamie Mccrae <Jamie.Mccrae@lairdtech.com>
Sent: Monday, November 12, 2018 2:15:11 PM
Subject: [Zephyr-devel] Calling a function not compiled as part of Zephyr from within Zephyr
I am attempting to run an external function on an nRF52840 which is present on the module's flash at a known address but is not part of the Zephyr environment (consider it external). The function doesn't do much except update some pointers which are provided to it, however when attempting to run the function from Zephyr, it generates a usage fault error, "Illegal use of the EPSR". I assume this is caused by a kernel security feature, so how would one go about calling an external function generated in a different build environment from Zephyr without it causing a fault?