6 years, 7 months ago.

HelloESP8266Interface for STM32F103RB works for online compiler, failed in MDK5 toolchain.

I am using STM32F103RB to evalute HelloESP8266Interface, the online compiler works fine, and downloaded binary firmware can bring up NUCLEO board to running as expected.

When I export to MDK5 toolchain, the compiler complains about missing typedef for CAN_S, then I patched some header file including objects.h and PeripheralNames.h. Then the building is passed without any complains.

After enabling debugger view in MDK5, the main can not be hit, the core stops at HARDFAULT.

Then I checking the calling stack, the issue took place at SerialBase set_irq.

Recently, I frequently find same issue for typedef missing for CAN bus in STM32F103, and Hardfault. Sometimes I can locate the hardfault due to my memory leakage of array. In most of time, it seems a bug in platform.

But I am confused about the fact, why online compiler works well and offline toolchain doesn't ?

1 Answer

6 years, 7 months ago.

Hey there,

I would recommend using this tutorial - https://docs.mbed.com/docs/mbed-os-api-reference/en/latest/APIs/communication/wifi/. This example uses the latest and greatest of both mbed OS and the ESP8266 driver.

Where did you see the HelloESP8266Interface linked? I would like to update the link.

Cheers, Sarah

Accepted Answer

Thanks, Sarah,

I will try this tutorial.

Do you mean the URL for the project? https://os.mbed.com/teams/components/code/HelloESP8266Interface/

I guess this link is the project with a snapshot of mbed-os ? If I create a new project for latest mbed-os and import ESP8266Interface, can this differences removed ?

UPDATE

Since I can comment on your reply twice, I have no idea why. So I update my comment here.

I found the project link by search box in mbed site, there is no embedded URL inside any web page.

The differences I mentioned is:

a) compiled by online compiler, it works well on hardware. b) exported to Keil MDK5, and get compiled locally, it lacks of CAN definitions in some header files, and it will run into HARDFAULT even been patched.

So the two approaches are different in both compile time and runtime.

posted by Kai Liu 21 Sep 2017

I just want to know where you saw this link on the website - https://os.mbed.com/teams/components/code/HelloESP8266Interface/. It is outdated and I'd like to update with the most recent ESP8266 example.

I might not be understanding your last question. What differences do you mean? You can use the project linked here - https://docs.mbed.com/docs/mbed-os-api-reference/en/latest/APIs/communication/wifi/ - and update the main.cpp file to better suit your needs.

posted by Sarah Marsh 21 Sep 2017