Merge pull request #962 from openmv/threading

Disable threading.
This commit is contained in:
Ibrahim Abd Elkader 2020-11-13 17:06:49 +02:00 committed by GitHub
commit 19014e07fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

@ -1 +1 @@
Subproject commit b7ddc1124da6ac0ce392982ada821c9cd8d54ffc Subproject commit 2156f107766ee77fcde80b012331de586007d01c

View File

@ -86,7 +86,9 @@
int errno; int errno;
extern char _vfs_buf; extern char _vfs_buf;
static fs_user_mount_t *vfs_fat = (fs_user_mount_t *) &_vfs_buf; static fs_user_mount_t *vfs_fat = (fs_user_mount_t *) &_vfs_buf;
#if MICROPY_PY_THREAD
pyb_thread_t pyb_thread_main; pyb_thread_t pyb_thread_main;
#endif
static const char fresh_main_py[] = static const char fresh_main_py[] =
"# main.py -- put your code here!\n" "# main.py -- put your code here!\n"
@ -448,7 +450,9 @@ int main(void)
// Basic sub-system init // Basic sub-system init
led_init(); led_init();
pendsv_init(); pendsv_init();
#if MICROPY_PY_THREAD
pyb_thread_init(&pyb_thread_main); pyb_thread_init(&pyb_thread_main);
#endif
// Re-enable IRQs (disabled by bootloader) // Re-enable IRQs (disabled by bootloader)
__enable_irq(); __enable_irq();
@ -463,8 +467,10 @@ soft_reset:
machine_init(); machine_init();
#if MICROPY_PY_THREAD
// Python threading init // Python threading init
mp_thread_init(); mp_thread_init();
#endif
// Stack limit should be less than real stack size, so we have a // Stack limit should be less than real stack size, so we have a
// chance to recover from limit hit. (Limit is measured in bytes) // chance to recover from limit hit. (Limit is measured in bytes)
@ -732,7 +738,9 @@ soft_reset:
#if MICROPY_HW_ENABLE_CAN #if MICROPY_HW_ENABLE_CAN
can_deinit_all(); can_deinit_all();
#endif #endif
#if MICROPY_PY_THREAD
pyb_thread_deinit(); pyb_thread_deinit();
#endif
#if MICROPY_PY_AUDIO #if MICROPY_PY_AUDIO
py_audio_deinit(); py_audio_deinit();
#endif #endif