Search found 54 matches

by BramPeeters
Mon Sep 17, 2018 1:30 pm
Forum: Development of MicroPython
Topic: [SOLVED]garbage collector + stack of startup task
Replies: 30
Views: 16575

Re: garbage collector + stack of startup task

Small update, I located the issue, it was due to a bug in my porting :( . Details: In void mp_thread_init(void) { mp_thread_mutex_init(&thread_mutex); mp_thread_set_state(&mp_state_ctx.thread); // create first entry in linked list of all threads thread = &thread_entry0; thread->id = xTaskGetCurrentT...
by BramPeeters
Wed Sep 12, 2018 10:57 pm
Forum: Development of MicroPython
Topic: [SOLVED]garbage collector + stack of startup task
Replies: 30
Views: 16575

Re: garbage collector + stack of startup task

I tried that (enabling verbose mode in mpportconfig I assume you mean) . That is when i saw that if i moved the stack onto the heap there were only +- 5 sweep (=free) messages (and it kept working) versus +-20 sweeps (and it crashed after suspend/resuming) if it was still in static memory during the...
by BramPeeters
Wed Sep 12, 2018 10:40 pm
Forum: Development of MicroPython
Topic: [SOLVED]garbage collector + stack of startup task
Replies: 30
Views: 16575

Re: garbage collector + stack of startup task

. I enjoy this.
Lol :p
by BramPeeters
Wed Sep 12, 2018 10:32 pm
Forum: Development of MicroPython
Topic: [SOLVED]garbage collector + stack of startup task
Replies: 30
Views: 16575

Re: garbage collector + stack of startup task

Ok, you are absolutely right, thanks, I apologize ! The reason I thought it would be rejected is because i was (falsely) under the impression that in gc_collect_root the addresses 32, 36, 40 would be passed to VERIFY_MARK_AND_PUSH() and hence rejected. But that is not what happens, the addresses are...
by BramPeeters
Wed Sep 12, 2018 9:43 pm
Forum: Development of MicroPython
Topic: Exiting the script after creating threads will crash the system ?
Replies: 6
Views: 3981

Re: Exiting the script after creating threads will crash the system ?

You forget to tell that you analyze execute_from_str in examples/embedding/hello-embed.c. I indeed took that sequence from the example, as an temporary intermediate step because ultimately i would like to run precompiled bytecode but that did not seem that trivial (cfr https://forum.micropython.org...
by BramPeeters
Wed Sep 12, 2018 8:56 pm
Forum: Development of MicroPython
Topic: [SOLVED]garbage collector + stack of startup task
Replies: 30
Views: 16575

Re: garbage collector + stack of startup task

I know and deeply understand all the stuff you just said, I had to port the gc_helper_get_sp and gc_helper_get_regs_and_sp functions myself because my IAR compiler does not support the syntax micropython is using. I have external non python created threads calling callbacks into python land which re...
by BramPeeters
Wed Sep 12, 2018 6:34 pm
Forum: Development of MicroPython
Topic: [SOLVED]garbage collector + stack of startup task
Replies: 30
Views: 16575

Re: garbage collector + stack of startup task

Proprietary hardware, the code i am using is a combination of the stm32 (because the cpu is an stm32) and cc3200 (because i use it on top of freertos) ports. So my 'initial task' was originally a freertos task as in cc3200 (static stack so not on heap). But if i am not mistaken in the stm32 port the...
by BramPeeters
Wed Sep 12, 2018 6:24 pm
Forum: Development of MicroPython
Topic: Bug in execute_from_str
Replies: 13
Views: 7643

Re: Bug in execute_from_str

Looks way better than the direct 0 I replaced lex->source_name with ;p
Thanks
by BramPeeters
Wed Sep 12, 2018 6:18 pm
Forum: Development of MicroPython
Topic: [SOLVED]garbage collector + stack of startup task
Replies: 30
Views: 16575

Re: garbage collector + stack of startup task

No can do, after checking and finding some old stackexchange/stackoverflow accounts, it seems they do not have the required 20 reputation to even be able to say something . Besides, what is the point of spreading this information over 2 places and I think this forum is where ppl will start looking i...
by BramPeeters
Wed Sep 12, 2018 5:05 pm
Forum: Development of MicroPython
Topic: Exiting the script after creating threads will crash the system ?
Replies: 6
Views: 3981

Re: Exiting the script after creating threads will crash the system ?

There is no 'hard' reason really.
Just the way i made some scripts for testing thread creation where the treads i created continued to do things for a longer time than the main thread which already had exited, simply because i was not aware of the limitation.