cancel
Showing results for 
Search instead for 
Did you mean: 

How do i make my stm32l476 act as a bridge to flash code from my pc to esp32 ?

MaddyGitBase
Associate

I am working on a project in which the sensor data that will calculated by stm32 will be sent via using the esp32 as a wifi module to aws , now the problem is i have inserted the stm32 and esp32 inside a pcb with the required circuit connection but i am having difficulty flashing the code to esp32 or connecting to esp32 , i have tried various methods but cant seem to find a solution. 

thing is the code cannot be flashed directly to esp32 , it has to be sent via stm32 due to circuit connections and no availability of usb connection ?

current status right now:- 

i am using the process of semihosting to flash the code into stm32 and get results on the serial monitor since i dont have a usb connection for stm32 , i am using the st link of nucleo externally , if someone can help me regarding conversion of my stm32l476 to a bridge to flash code on esp32  or to convert esp32 to wifi module ,it would be very helpful ,this is the last step after this only calibration is required to complete my project.

3 REPLIES 3
Pavel A.
Super User
FBL
ST Employee

Hi @MaddyGitBase 

 

To program the ESP32, semihosting is not recommended. Semihosting is a debug I/O feature for the STM32, while ESP32 flashing requires a programming path such as UART bootloader mode with control of EN and GPIO0 pins. If those ESP32 pins are not accessible on the PCB, a hardware or wiring change is required.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.




Best regards,
FBL
Andrew Neil
Super User

@MaddyGitBase wrote:

 the code cannot be flashed directly to esp32 , it has to be sent via stm32 due to circuit connections and no availability of usb connection ?


Is that a question ?

 


@MaddyGitBase wrote:

i am using the process of semihosting to flash the code into stm32 and get results on the serial monitor since i dont have a usb connection for stm32 


Do you really mean Semihosting here? As @FBL said, Semihosting would not be a usual way to do this!

 


@MaddyGitBase wrote:

help me regarding conversion of my stm32l476 to a bridge to flash code on esp32  


So what have you done so far?

You'll need to research what options the ESP32 has for firmware updates; eg, a UART bootloader?

Does it not support OTA updates using its WiFi?

You'll need to go to an ESP32  and/or Espressif forum for that; eg, https://esp32.com/ - it's nothing to do with ST or STM32

 


@MaddyGitBase wrote:

or to convert esp32 to wifi module.


Surely, an ESP32 is a WiFi module?

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.