py/persistentcode: Clarify ValueError when native emitter disabled.
This commit is contained in:
parent
bd4e45fd68
commit
d521899e18
@ -402,9 +402,15 @@ mp_compiled_module_t mp_raw_code_load(mp_reader_t *reader, mp_module_context_t *
|
||||
if (MPY_FEATURE_DECODE_ARCH(header[2]) != MP_NATIVE_ARCH_NONE) {
|
||||
byte arch = MPY_FEATURE_DECODE_ARCH(header[2]);
|
||||
if (!MPY_FEATURE_ARCH_TEST(arch)) {
|
||||
if (MPY_FEATURE_ARCH_TEST(MP_NATIVE_ARCH_NONE)) {
|
||||
// On supported ports this can be resolved by enabling feature, eg
|
||||
// mpconfigboard.h: MICROPY_EMIT_THUMB (1)
|
||||
mp_raise_ValueError(MP_ERROR_TEXT("native code in .mpy unsupported"));
|
||||
} else {
|
||||
mp_raise_ValueError(MP_ERROR_TEXT("incompatible .mpy arch"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
size_t n_qstr = read_uint(reader);
|
||||
size_t n_obj = read_uint(reader);
|
||||
|
Loading…
Reference in New Issue
Block a user