Forum Replies Created
-
AuthorPosts
-
jhinkleParticipant
In reply to your post 7993 – I provided that it was not resetting.
I could place the BP in user_init() and it hits once.
Place the BP on the s_Tick++ and it run and breaks without the value being updated. I place the BP after the s_Tick++ and it get incremented. That is why I stated it appears to be an issue with the instruction simulation associated with the BP.
I will try your code shortly.
Thanks.
jhinkleParticipantDoes using the gdbstub inhibit the use of os_printf?
I’ve spent 6 hours trying and researching on outputing os_printf();
I see that the gdbstub.c defines it as … int os_printf_plus(const char *format, …) __attribute__ ((format (printf, 1, 2)));
I have two usb-uart attached to the ESP — one on uart0 — programming and gdb — the other connected to uart1-tx
I get the standard resart and sdk check info coming out uart1 — but nothing else.
I have run the application – not attached to the debugger — having uart0 go to a terminal program — no os_printf info.
Can you please share how to acquire the os_printf() info?
Baudrate in both cases is 74800.
Thanks.
jhinkleParticipantI’m doing a detailed debug to try to resolve my issues.
JTAG is on hold and I’m using the gdbstub+serial
I created a new project – blink led + iot sdk
Below is a portion of the code from BlinkLED.c
static os_timer_t s_Timer; int s_Tick = 0; void TimerFunction(void *arg) { s_Tick++; //Uncomment the line below to disable the software watchdog that will restart the ESP8266 system after it spends more than ~1 second stopped at a breakpoint. system_soft_wdt_stop(); if (GPIO_REG_READ(GPIO_OUT_ADDRESS) & BIT1) { gpio_output_set(0, BIT1, BIT1, 0); } else { gpio_output_set(BIT1, 0, BIT1, 0); } } int user_init() { #ifdef ESP8266_GDBSTUB gdbstub_init(); #endif gpio_init(); #ifdef ESP8266_GDBSTUB //#error The LED on the Olimex board is multiplexed with the TXD line used by the GDB stub. In order to use the stub, select a different LED pin below. #endif PIN_FUNC_SELECT(PERIPHS_IO_MUX_MTDO_U, FUNC_GPIO1); //PERIPHS_IO_MUX_U0TXD_U gpio_output_set(0, BIT1, BIT1, 0); os_timer_setfn(&s_Timer, TimerFunction, NULL); os_timer_arm(&s_Timer, 300, 1); return 0; }
I changed the led pin to a different pin as shown above. and removed the DOG from playing.
set break point at return from user_init and all works well to that point.
I remove the BP and set it at the s_Tick++; in TimerFunction() and RUN.
BP is hit — run — BP hit … can do this without issue –GOOD!.
I try to see the value of s_Tick to verify the program is running or just resetting.
It appears that the gdbstub has an issue properly emulating the instruction the BP is set to.
I set the BP to the s_Tick and perform multiple RUN/BP break and the s_Tick never changes.
I set the BP to the next line of code … system_soft_wdt_stop(); and s_Tick will increment as expected.
So … it appears you have to be very careful where you set BreakPoints or your BP may introduce execution errors — Please confirm this is true.
Another observation — not an issue — just a Be Aware.
When you want to perform a debug run, and your setup is to only flash if code changes, NO BP that are set in the user_init() will be hit because the ESP has already executed past that point … so make sure your BP is set where it can be reached outside on any one-time init calls.
Next test …. BlinkLED using RTOS.
Made the change to PIN_FUNC_SELECT(PERIPHS_IO_MUX_MTDO_U, FUNC_GPIO1); as in the iot sdk.
Set BP in user_init().
BP never hit — GDB times out … error
Changed the BP to the LEDBlinkTask() … same result … BP never hit — GDB times out … error
So … it appears RTOS programs are crashing/lock-up prior to reaching user_init();
Are you aware of any RTOS implementation bugs?
Is YOUR testing of RTOS BlinkLed working?
What can I provide to help resolve the RTOS implementation issue I am encountering?
Thanks
- This reply was modified 8 years, 7 months ago by support. Reason: formating
jhinkleParticipantMore info
Connecting to GDB stub …
too long
target remote //./COM3
I tried at both 74800 and 115200 baud … both behaved the same way.
Again — flashed OK — just not debug.
jhinkleParticipantI would like to use this program — but only if I can get it to work.
I gave up on jtag and setup for gdbstub using a serial port.
Compiled and flash OK but the GDB Session failed to start with error: “Program is not being run”.
Any ideas.
Thanks.
jhinkleParticipantESP-03 is the same as the Olimex ESP8266 board.
Any other suggestions?
My trial period is up soon and I have not got things to work yet.
Thanks.
jhinkleParticipantSorry – found them.
The settings are correct – they are the same when flashing the chip using esptool.
jhinkleParticipantWhere do you set/change the flash FLASH type, speed and size settings.
I have looked in properties and fond nothing.
Thanks in advance to informing me.
jhinkleParticipantUpdate
Started another new project
ESP8266 -> Blink Led using IoT sdk.
It locks/fails just like the HTTP – rtos project.
So running out of ram seems to work OK — but — bring in the sdk and it fails.
Are this good proven projects?
jhinkleParticipantUpdate
Started a new project
ESP8266-NOFLASH –> Blink LED
All works as expected.
So what’s happening to the HTTP Server – RTOS project?
jhinkleParticipantWent back to debug – “Emulate a CPU reset”
help?
jhinkleParticipantUpdate
Changed Reset in debug properties to “Reset Chip”.
It never breaks at my breakpoint in “user_init” but does break on its own in the “ServerTask” … note ServerTask is created and started from user_init() so it does not make sense.
the following is reported when the break occurs: Received a SIGTRAP: Trace/breakpoint trap.
Any comments appreciated.
jhinkleParticipantNext issue …
VisualGDB flashed the ESP-03 but display the following information:
trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain connect_deassert_srst
adapter speed: 1000 kHz
stop_wdt
Info : clock speed 1000 kHz
Info : TAP esp8266.cpu does not have IDCODE
Info : halted: PC: 0x4000118c
Info : debug cause: 0x20
Info : accepting ‘gdb’ connection on tcp/3333
Info : TAP esp8266.cpu does not have IDCODE
Warn : xtensa_poll: DOSR has set InOCDMode without the Exception flag. Unexpected. DOSR=0x04
target state: halted
Info : halted: PC: 0x4000118c
Info : debug cause: 0x20
Warn : xtensa_deassert_reset: ‘reset halt’ is not supported for Xtensa. Have halted some time after resetting (not the same thing!)
Info : halted: PC: 0x40005668
Info : debug cause: 0x1
Info : halted: PC: 0x4010013c
Info : debug cause: 0x8
Info : halted: PC: 0x4010013c
Info : debug cause: 0x8
Info : halted: PC: 0x4010013c
Info : debug cause: 0x8
Info : halted: PC: 0x4010013c
Info : debug cause: 0x8
Info : halted: PC: 0x4010013c
Info : debug cause: 0x8
Info : halted: PC: 0x4010013c
Info : debug cause: 0x8
Info : halted: PC: 0x4010013c
Info : debug cause: 0x8
Info : halted: PC: 0x4010013c
Info : debug cause: 0x8
Interrupt suppression during single-stepping is now enabled
Watchdog feeding during stops is now enabledMy break point was never reached so the ESP has crashed or not running.
I connected the jumper pads on the ESP-03 which allows GPIO16 to manipulate the RESET pin.
I have connected GPIO16 to jtag pin 3
I’ve connected GPIO0 to vcc (thru a resistor).
GPIO15 to vcc (thru a resistor).
I believe GPIO0 and GPIO15 are proper — if not — please tell me.
I’ve loaded the HTTP RTOS server as the test program.
I’ve “break all” and went to see the hardware registers to check the IP — but non have been implemented.
Are the ESP8266 hardware registers going to be available in the future?
Without access to the registers I have no idea as to the IP location … locked? running??
I know it never entered “user_init”
Any comment appreciated.
jhinkleParticipantI think I resolved it.
Got Zidag and it loaded the Olimex driver.
-
AuthorPosts