Open ralcaide opened 6 years ago
This modification should be done in other repository. TODO RAE: Point here the repo / branch to be modified
Branch for talking fiber bootloader:
https://github.com/Sinapse-Energia/bootloader-stm32/tree/CortexM3_TalkingFiber
TODO:
Please, perform this task in order to close the MVP
We are getting HardFault() when testing on GPRS connect stage.
I saw the code and I don't understand very well how are you managing the new DEFAULTBOARD tag named TFiberBoard. You define it but then is not used, right? This BL should be compatible with all the Sinapse M3 boards, depending the board is necessary to call a different GPIO_INIT and maybe do some extra operations. Is maybe this HF related with the bad management of the board?
As I see in commit, the board management is also done in GPIO init, by checking board type and performing specific init for TF board.
Right, sorry. So, any idea about the HF?
HF appears in M95 driver while connecting.
In Tranceiver.cpp line 479 there is call for executeCommand executeCommand(&trerror, phuart, 0);
In this call cirular buffer pointer is 0, so when executeCommand try to access circular buffer (Tranceiver.cpp line 356) it passes zero pointer to Stock function, Stock try to access circular buffer on this pointer and goes to HF because access zero pointer.
This bug appears only when execute command call in line 477 returns zero (when some AT command request getting invalid response from M95).
Proposed fix: add zero pointer check into Stock or executeCommand functions.
Thanks, I will explain that to the Engine Developer and will come back with a proposed solution
Questions:
After take a look to the code we've found the problem. We will have the fix this night and I will add here the patch. Leave in standby this task until then
Please, integrate the last two commits (5 sept) of this branch https://github.com/Sinapse-Energia/bootloader-stm32/commits/CortexM3 in order to fix the problem:
This should fix the problem: https://github.com/Sinapse-Energia/bootloader-stm32/commit/fc16ca94e5c668718308da7250d065933a679d4b
This avoid failures of QIOPEN: https://github.com/Sinapse-Energia/bootloader-stm32/commit/ef984dc2f215e4ba939d778f6548c2e0eb6c77ec
Commits integrated, bootloader tested and working.
This issue should be tested. Until now we were working without BL
We are now testing the Bootloader integration with the current client and it is not working. The definitions of the Bootloader that we are using is the following one. @vAnArhist , could you please test why is not working in one of your devices? The binary is in our server. Try to download this binary and check the the BL launch the client and if not try to understand why, please.
`#ifndef _DEFINITIONSH
// Value to be used when discovery fails // Values are: // Board0 -> Classic M2M (Vodafone) // Board1 -> Square, piggyback M2M // Board2 -> Pretty box (Orange) //#define DEFAULTBOARD Board1
// LABELS for SELECTIVE BUILD
// LABELS FOR TRANSCEIVERS
//#define BUILD_BG96 //#define BUILD_RM08
#define BUILD_M95
#define BUILD_BG96
#define BUILD_RM08
#define BUILD_CANBUS
// TRASPORT LABEL (COMPOSITES)
// LABELS FOR OPTIONAL FEATURES
extern "C" {
// // // // // *** //
// RAE definitions
// Francis definition.
// seconds after submit HLK configuration
// seconds after submit HLK connection
// GPRS init
//#define const_APN "\"im2m.matooma.com\",\"movistar\",\"movistar\"\r\0" //#define const_APN "\"m2m.tele2.com\",\"tele2\",\"tele2\"\r\0"
//#define const_APN "\"lte.m2m\",\"\",\"\"\0" //#define const_APN "\"orangeworld\",\"orange\",\"orange\"\r\0"
//#define const_MAIN_SERVER "\"m2m.eclipse.org\",1883\r\0" //#define const_MAIN_SERVER "\"178.94.164.124\",80\r\0" //#define const_MAIN_SERVER "\"89.248.100.11\",80\r\0" //#define const_MAIN_SERVER "\"sinapseenergia.com\",80\r\0" //#define const_MAIN_SERVER "\"sinapseenergia.com\"\r\0"
// Maximum number ot connection tries before resetting the device
// Maximum size for the datablock to save & restore from NVM
//#define RTC_CLOCK_SOURCE_LSE //Se usa el externo 32768Hz. //#define RTC_CLOCK_SOURCE_HSE //Se usa el externo 32768Hz.
// Wait for HTTP server answer (sec)
// HTTP connection
//#define HTTP_SERVER_IP "sinapseenergia.com\0"
//#define HTTP_SERVER_FW_FILENAME "600012.bin\0" //#define HTTP_SERVER_FW_FILENAME "TESTING_M2M.bin\0" //#define HTTP_SERVER_FW_FILENAME "EC-M2M-LU_LUM-V114-NODEBUG.bin\0"
// Client using M95 //#define HTTP_SERVER_FW_FILENAME "EC-M2M-LU_LUM-V114-DEBUG.bin\0" // Client using RM08 on board1 (piggy-back) //#define HTTP_SERVER_FW_FILENAME "B1-HLK-WIFI-JR-V1.26.bin" // Client using RM08 on board2 (Orange) // #define HTTP_SERVER_FW_FILENAME "B2-HLK-WIFI-JR-V1.26.bin"
//#define HTTP_SERVER_FW_FILENAME "B0-ALL-ETH-JR-V1.26.3.bin" //#define HTTP_SERVER_FW_FILENAME "B0-ALL-WIFI-JR-V1.26.3.bin"
//define HTTP_SERVER_FW_FILENAME "B1-ALL-WIFI-JR-V1.26.3.bin" //#define HTTP_SERVER_FW_FILENAME "B1-ALL-ETH-JR-V1.26.3.bin"
// Define Bank Sectors (11 sectors total - for STM32F4xx devices) // Bootloader /// Verified: Definition sector in STM32F2xx is equivalent to STM32F4xx family.
// Application
// Application copy
// App version addressing (+ release data address dd/mm/yy) // placed in first address of the Firmware/Application memory
}
@ralcaide Could you provide on which topic should I subscribe?
The binary has an APN that will not work for you I think because the APN is TM. The goal is to check if the bootloader (with your APN) is able to download the client and boot it. Anyway the client is publishing in the Sinapse broker on the topic: TEST_TFS_BL
@ralcaide Tested with bootloader with your binary and mine with changed APN. With your - download OK, but not published (as the APN is not suitable for my SIM operator). Checked downloading binary with my server, changed APN, all is OK, publishing is working.
It is strange because for us is not working.
@ralcaide APN:
Checked without debugger, all is ok.
@vAnArhist Uploaded a binary into the eluxoon server:
Server: www.eluxoon.com port: 80 path: / name: tf_test_internet.bin apn: internet topic: TFS_DR_BL broker: soporte-tecnico.bitnamiapp.com
Could you please test that it is well downloaded and launched without programmer? If yes, please provide me the diff of your Bootloader in relation the github code and also a bootloder with APN = #define const_APN ""TM","",""\0" We are not able until now to make the BL work with a client.
Like in #1. Is necessary to modify the GPIO init and delete the unnecessary transceivers.