mirror of https://github.com/ARMmbed/mbed-os.git
Added check for python version before calling post build action. Fixed compilation for Python 2.7.
parent
515555e7ba
commit
d289b967f7
|
@ -680,6 +680,17 @@ class PSOC6Code:
|
||||||
"""
|
"""
|
||||||
Calls sign_image function to add signature to Secure Boot binary file.
|
Calls sign_image function to add signature to Secure Boot binary file.
|
||||||
"""
|
"""
|
||||||
|
version = sys.version_info
|
||||||
|
|
||||||
|
# check python version before calling post build as is supports only python3+
|
||||||
|
if((version[0] < 3) is True):
|
||||||
|
t_self.notify.info("[PSOC6.sing_image] Be careful - produced HEX file was not signed and thus "
|
||||||
|
"is not compatible with Cypress Secure Boot target. "
|
||||||
|
"You are using Python " + str(sys.version[:5]) +
|
||||||
|
" which is not supported by CySecureTools. "
|
||||||
|
"Consider installing Python 3.7+ and rebuild target. "
|
||||||
|
"For more information refver to User Guide https://www.cypress.com/secureboot-sdk-user-guide")
|
||||||
|
else:
|
||||||
from tools.targets.PSOC6 import sign_image as psoc6_sign_image
|
from tools.targets.PSOC6 import sign_image as psoc6_sign_image
|
||||||
psoc6_sign_image(t_self, binf)
|
psoc6_sign_image(t_self, binf)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue