Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiler change UART transparent bridge behaviour #132

Open
psolyca opened this issue Jun 11, 2019 · 0 comments
Open

Compiler change UART transparent bridge behaviour #132

psolyca opened this issue Jun 11, 2019 · 0 comments

Comments

@psolyca
Copy link

psolyca commented Jun 11, 2019

I do not know if this issue could be related to issue #124 but I had trouble with UART transparent bridge and live monitor so I tried to find the bug.

The trouble

To flash my ESP8266, I need an USB<->TTL converter.
As I had a BusPirate v3b, I tried to use it with the UART Transparent bridge mode.
First, I have flashed the community firmware (09032019_OPT1_UNSAFE.hex) and get the prompt of the ESP8266 (micropython), the UART works.
The command :
m 3 9 enter enter enter 2 W (1)y

To be able to flash, I close my terminal, put my ESP8266 in download mode and launch my ESP8266 flash tool with a test command (BusPirate always in transparent bridge) :
esptool.py -p COM7 chip_id
I have "A fatal error occurred: Failed to connect to Espressif device: Invalid head of packet (0xE0)" or "(0xD0)"
Same error whatever the command.

To be sure my download mode works on my ESP8266, I have used a Raspberry and the flash has worked.

The test

So as mentionned in issue #124, I downgraded my BusPirate to different firmware, a.k.a

  • v6.2-r1981
  • v6.3-r2088
  • v6.3-r2152

With these firmwares I had no trouble testing the ESP8266.

The find

I tried to bisect the git repository (thanks to git bisect command) but between the first good commit and the last bad one, there was a difference of compiler from C30 to XC16.
So I tried some revision between 10f1ec1 and e45a5fa where I can easily compile both version.
I compiled them with C30 then XC16.
Each time, C30 versions work as intended and not XC16 (same message each time).

How I proceed

Each time, I have imported the old MATLAB 8 configuration file from a clean repository and then select C30 then XC16 compiler.
Each version have build fine without error with level 1 optimization.
I then upload the firmware with pirate-loader.
The behaviour of the firmware between the imported configuration in XC16 and the XC16 configuration is the same.

Finally

How does the compiler can change the behaviour of the firmware?
Is there a specific parameter which change from one compiler to the other?
Have I forgot something or done something wrong ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant