Working alongside the mxmrt teensy 4.1 port MP_STATE_THREAD ERRORS #10023
Replies: 6 comments
-
I commented out the these two lines: in ../../py/stackctrl.c
and get this on my debugger now:
|
Beta Was this translation helpful? Give feedback.
-
This is my main.cpp note .cpp What I got going on with the two startup files, from the core and micropython is ImageVectorTable loading resetHandler() first which is teensies then basically loads reset_handler(), I combined the ISR's by just extern'ing the ISR_vector or whatever in startup.S
|
Beta Was this translation helpful? Give feedback.
-
Then I get this when I have stack_ctrl_init or whatever first
|
Beta Was this translation helpful? Give feedback.
-
Any clues? MP_THREAD doesn't seem correct because I'm not in a threaded environment, maybe I have to time travel back to the original mimxrt project. I don't know. When I run it with freeRTOS(teensy) and some of the pythread stuff from the esp stuff I get a a debugger error, perhaps a crash somewhere in the deep core. |
Beta Was this translation helpful? Give feedback.
-
I tried to upload the code but it didn't complete, once upon a time, sadly. |
Beta Was this translation helpful? Give feedback.
-
MP_STATE_THREAD is a helper that is used to access state variables that need to be thread local if threading is enabled. On a non-threaded build, they are just regular state variables. Hope that helps. #define MP_STATE_VM(x) (mp_state_ctx.vm.x)
#define MP_STATE_MEM(x) (mp_state_ctx.mem.x)
#define MP_STATE_MAIN_THREAD(x) (mp_state_ctx.thread.x)
#if MICROPY_PY_THREAD
extern mp_state_thread_t *mp_thread_get_state(void);
#define MP_STATE_THREAD(x) (mp_thread_get_state()->x)
#else
#define MP_STATE_THREAD(x) MP_STATE_MAIN_THREAD(x)
#endif |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Why would you think I'm getting this error in my debugger?
This is the memory section in my .ld file
Beta Was this translation helpful? Give feedback.
All reactions