Any general discussion around the firmware, what is does, how it does it etc.
User avatar
By moussie369
#67625
Oops, I am deeply sorry I didn't enable notification and have been pretty busy for the last month so I only saw you answered now.
At the time I had just changed computers so I was on a fresh windows install but for some reason I kept my old .platformio folder and some things got corrupted along the way (I figured this out yesterday while building an esp32 example from a random library),I did a fresh install of VSCode (I deleted the old .platformio folder obviously) to correct this.

The latest master is now reported to be 202405 and to keep things simple I am using the stock build flags (I also tried disabling USB to connect via RS232 PA9,PA10 but it won't work), this version builds just fine but won't connect to TS (Connection Type : RS232 Serial Interface, the selected COM Port is the same as my STM32 and baud rate is set to 115200), doing a "Test Port" makes TS act weird (it hangs there and takes a long time to close afterwards unless I use the "Detect" function).
With the fresh install 202402 now builds just fine but does the exact same thing with TS.

I tried older releases but they won't build, I am deeply confused because everything is fresh, I haven't changed anything and it did work at one point, maybe an update to a library broke something ?
They build just fine with the Arduino IDE and I can get them to work over RS232 if I disable USB but that doesn't work one newer releases for some reason.

What would you suggest I try ? Also do you know what the build flags should be to use RS232 in the latest release ?
(Only -DHAL_PCD_MODULE_ENABLED, -DUSBCON and -DUSBD_USE_CDC should be removed if I recall)
User avatar
By moussie369
#67746
Any idea of what might be happening and how to correct it ?
My spare STM32 is an F407ZGT6 but it use to work treating it like a VET6 and it doesn't come into play during the build phase of the older releases so I would be really surprised that's the problem here.
I don't want to risk "breaking" my VET6's firmware as it is working fine, or at least seems to, so I think trying to install the latest version on this one is a really, really bad idea.
User avatar
By jonbill
#67774
Whats the problem again? is the problem uploading from platformio, or connecting to TS with the newly installed firmare?
what PC environment are you using? windows? Mac?
User avatar
By moussie369
#67775
I can build and upload the latest version from platformio but I can't access it through TS.
I can't seem to be able to build the older versions with platformio anymore but it will work with arduino IDE (at least for the ones I have on hand) and I can connect via TS with those (but that may or may not come with its share of problems).
I am using windows 11.
User avatar
By jonbill
#67776
which board are you using?
I know that at least the "mega f407" has dips to select native USB vs FTDI and you need different compile options for the two.
User avatar
By moussie369
#67777
The spare board I am doing testing on is an F407ZGT6.
I also have a VET6 on the true ECU but since I am having issues I don't think it would be a good idea to experiment with it, it's also in a sealed case and I don't think I can change the firmware unless I open it.
User avatar
By PSIG
#67783
moussie369 wrote: Mon Apr 01, 2024 6:59 pm… it's also in a sealed case and I don't think I can change the firmware unless I open it.
Just curious, what Speeduino ECM is in a sealed case you cannot access or make firmware upgrades? Is the ECM designed for Speeduino?
User avatar
By moussie369
#67785
It's the spectre design from tjeerdie.
It's not that I can't upgrade the firmware it's that I don't think I can upgrade it over RS232, and if it somehow failed I don't see how I could put the board in dfu mode without opening the case.
To upgrade it I need to open the case which means breaking the gasket, there's no real problem with doing it, it's just inconvenient and I'd need to get supplies to seal it again.
I don't want to try on this unit unless I am 100% sure that the problem comes from the spare board since I can't build the older versions (which I know are working) with pio anymore for some reason.
Maybe there's a way I could extract what's currently on it ? (With cube programmer?)
User avatar
By moussie369
#67789
With the stock buildflags I get this for version 202202 :

speeduino\src\FRAM\Fram.cpp: In member function 'void FramClass::setClock(uint32_t)':
speeduino\src\FRAM\Fram.cpp:118:24: error: no matching function for call to 'SPIClass::beginTransaction(uint8_t&, SPISettings&)'
118 | spi->beginTransaction(csPin, FRAMSettings);
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
In file included from speeduino\src\FRAM\Fram.h:25,
from speeduino\src\FRAM\Fram.cpp:25:
C:\Users\titou\.platformio\packages\framework-arduinoststm32\libraries\SPI\src/SPI.h:131:10: note: candidate: 'void SPIClass::beginTransaction(SPISettings)'
131 | void beginTransaction(SPISettings settings);
| ^~~~~~~~~~~~~~~~
C:\Users\titou\.platformio\packages\framework-arduinoststm32\libraries\SPI\src/SPI.h:131:10: note: candidate expects 1 argument, 2 provided
speeduino\src\FRAM\Fram.cpp: In member function 'uint8_t FramClass::spiSend(uint8_t)':
speeduino\src\FRAM\Fram.cpp:324:45: error: 'SPI_CONTINUE' was not declared in this scope
324 | else { reply = spi->transfer(csPin, data, SPI_CONTINUE); }
| ^~~~~~~~~~~~
Compiling .pio\build\black_F407VE\FrameworkArduino\stm32\OpenAMP\open-amp\rpmsg\rpmsg.c.o
speeduino\src\FRAM\Fram.cpp: In member function 'uint16_t FramClass::spiSend16(uint16_t)':
speeduino\src\FRAM\Fram.cpp:349:47: error: 'SPI_CONTINUE' was not declared in this scope
349 | else { reply = spi->transfer16(csPin, data, SPI_CONTINUE); }
| ^~~~~~~~~~~~
Compiling .pio\build\black_F407VE\FrameworkArduino\stm32\OpenAMP\open-amp\rpmsg\rpmsg_virtio.c.o
Compiling .pio\build\black_F407VE\FrameworkArduino\stm32\OpenAMP\openamp.c.o
Compiling .pio\build\black_F407VE\FrameworkArduino\stm32\OpenAMP\rsc_table.c.o
*** [.pio\build\black_F407VE\src\src\FRAM\Fram.cpp.o] Error 1
C:/Users/titou/Desktop/205/elec/ECU/code/speeduino-202202/speeduino/auxiliaries.ino:15:102: warning: taking address of packed member of 'config10' may result in an unaligned pointer value [-Waddress-of-packed-member]
15 | integerPID_ideal boostPID(&currentStatus.MAP, &currentStatus.boostDuty , &currentStatus.boostTarget, &configPage10.boostSens, &configPage10.boostIntv, configPage6.boostKP, configPage6.boostKI, configPage6.boostKD, DIRECT); //This is the PID object if that algorithm is used. Needs to be global as it maintains state outside of each function call
| ^~~~~~~~~~~~~~~~~~~~~~~
=========================================================================== [FAILED] Took 6.74 seconds ===========================================================================

Environment Status Duration
------------- -------- ------------
black_F407VE FAILED 00:00:06.740
==================================

I'll check your link in the evening and I'll try removing libdivide from the buildflags on the latest version to see if it changes anything.

Edit : I just tried to build the latest version without duse_libdivide in the buildflags and it fails, here's the error :

during RTL pass: combine
speeduino\decoders.cpp: In function 'void triggerSec_4G63()':
speeduino\decoders.cpp:1661:1: internal compiler error: Segmentation fault
1661 | }
| ^
libbacktrace could not find executable to open
Please submit a full bug report, with preprocessed source (by using -freport-bug).
See <https://gcc.gnu.org/bugs/> for instructions.
Compiling .pio\build\black_F407VE\src\src\STM32_CAN\STM32_CAN.cpp.o
*** [.pio\build\black_F407VE\src\decoders.cpp.o] Error 1
=========================================================================== [FAILED] Took 4.74 seconds ===========================================================================

Environment Status Duration
------------- -------- ------------
black_F407VE FAILED 00:00:04.736
====================================================================== 1 failed, 0 succeeded in 00:00:04.736 ======================================================================
  • 1
  • 27
  • 28
  • 29
  • 30
  • 31

I've managed to dig up a few obscure wiring diag[…]

Niiiice... 8-) Looking forward to your updates![…]

I'd be surprised if its not a 32-bit processor on[…]

I search for the datasheet of the IC and the on[…]

Still can't find what you're looking for?