[TM4C123] REPL debugging info

Discussion and questions about boards that can run MicroPython but don't have a dedicated forum.
Target audience: Everyone interested in running MicroPython on other hardware.
Post Reply
ExXec
Posts: 83
Joined: Sat Oct 20, 2018 4:02 pm

[TM4C123] REPL debugging info

Post by ExXec » Sat May 11, 2019 2:22 pm

Hey,

I have a strange problem.
The REPL shows the debugging info, even though I didn't enable it.
And when I call disable_irq() in the main its gone.

Does someone have an idea?

It looks like this:

Code: Select all

took 8 ms                                                                       
qstr:                                                                           
  n_pool=1                                                                      
  n_qstr=3                                                                      
  n_str_data_bytes=19                                                           
  n_total_bytes=115                                                             
GC: total: 24192, used: 1200, free: 22992                                       
 No. of 1-blocks: 11, 2-blocks: 5, max blk sz: 40, max free sz: 1432  
It comes from here: https://github.com/micropython/micropyt ... xec.c#L127
Last edited by ExXec on Mon Jul 08, 2019 10:20 am, edited 1 time in total.

ExXec
Posts: 83
Joined: Sat Oct 20, 2018 4:02 pm

Re: [TM4C123] REPL debugging info

Post by ExXec » Fri May 31, 2019 2:48 pm

anyone?

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: [TM4C123] REPL debugging info

Post by dhylands » Fri May 31, 2019 4:05 pm

It would be useful to know what debugging information you're talking about.

ExXec
Posts: 83
Joined: Sat Oct 20, 2018 4:02 pm

Re: [TM4C123] REPL debugging info

Post by ExXec » Sat Jun 01, 2019 5:12 pm

Sorry.
It looks like this:

Code: Select all

took 8 ms                                                                       
qstr:                                                                           
  n_pool=1                                                                      
  n_qstr=3                                                                      
  n_str_data_bytes=19                                                           
  n_total_bytes=115                                                             
GC: total: 24192, used: 1200, free: 22992                                       
 No. of 1-blocks: 11, 2-blocks: 5, max blk sz: 40, max free sz: 1432  
It comes from here: https://github.com/micropython/micropyt ... xec.c#L127

It would be great if you could tell me how to disable that. Maybe modify the exec_flags and/or the repl_display_debugging_info?

ExXec
Posts: 83
Joined: Sat Oct 20, 2018 4:02 pm

Re: [TM4C123] REPL debugging info

Post by ExXec » Fri Jun 21, 2019 12:49 pm

Does nobody know?

ExXec
Posts: 83
Joined: Sat Oct 20, 2018 4:02 pm

Re: [TM4C123] REPL debugging info

Post by ExXec » Mon Jul 08, 2019 10:20 am

push

User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: [TM4C123] REPL debugging info

Post by jimmo » Mon Jul 08, 2019 12:25 pm

I think we need more information?

The thread title implies you're talking about a port to the TM4C123, so I'm guessing you're only seeing this on your board? Can you link to a repo that has the code with this issue?

When do you see this - I'm guessing on every statement?

ExXec
Posts: 83
Joined: Sat Oct 20, 2018 4:02 pm

Re: [TM4C123] REPL debugging info

Post by ExXec » Mon Jul 08, 2019 8:15 pm

yes, on every statement,

I searched for every occurence of the variable repl_display_debugging_info, but none of them seemed to be suspicious.

i based my port mostly on the pyboard, so it "should" be roughly the same. (read: I copied a lot and didn't change it if it worked)

link to repo:
https://github.com/ExXeptional/micropyt ... ts/tm4c123

other causes I thought of:
something in the mpconfigport.h
Maybe its the -DDEBUG flag for the compiler?
I borked the initialization in the main()
a stray interrupt is called for whatever reason ( bc it doesn't happen w/ interrupts disabled)

if you need information please ask, but I don't know what else to tell you right now.

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: [TM4C123] REPL debugging info

Post by dhylands » Mon Jul 08, 2019 10:01 pm

If repl_display_debugging_info is set to a non-zero value then I think it will do what you're seeing.

repl_display_debugging_info is declared static, and winds up being in the .bss which means that its the responsibility of the runtime library code which calls main to clear the entire bss.

So the first thing I would look at is whether your bss is being cleared.

The next thing that could cause it would be some type of memory overwrite from some other C code which just happens to trample the memory location containing repl_display_debugging_info

ExXec
Posts: 83
Joined: Sat Oct 20, 2018 4:02 pm

Re: [TM4C123] REPL debugging info

Post by ExXec » Tue Jul 09, 2019 1:04 pm

So the first thing I would look at is whether your bss is being cleared.
Yes this was the problem.
It was locked behind a #ifdef and the define was accidentally removed somehow.

Thank you, I would've never looked there.

Post Reply