bigtreetech / BIGTREETECH-TouchScreenFirmware

support TFT35 V1.0/V1.1/V1.2/V2.0/V3.0, TFT28, TFT24 V1.1, TFT43, TFT50, TFT70
GNU General Public License v3.0
1.3k stars 1.65k forks source link

Can not load correctly after compiled in Visual Studio code #151

Closed tphan26363 closed 4 years ago

tphan26363 commented 4 years ago

I make change to has dual extruder to the TFT-24 controller. It compiled sucessfully is Visual studio Code. However when upload through SD card, after initial copy of the firmware. The TFT-24 appear unable to boot and load new code and just blackout. The changes as :

;BIGTREE_TFT24_V1_1 [platformio] src_dir = TFT boards_dir = buildroot/boards default_envs = BIGTREE_TFT24_V1_1 // change here

[common] default_src_filter = +<src/*> -<src/Libraries> -<src/User/Hal/stm32f10x> -<src/User/Hal/stm32f2xx> build_flags = -fmax-errors=5 -g -ggdb -DUSE_STDPERIPH_DRIVER= -D__STATIC_INLINE= -ITFT/src/Libraries/cmsis/Core-CM3 -ITFT/src/User/Fatfs -ITFT/src/User/Hal -ITFT/src/User/Menu -ITFT/src/User -ITFT/src/User/API -ITFT/src/User/API/UI -ITFT/src/User/API/Gcode -ITFT/src/User/API/Language -ITFT/src/User/API/Vfs -ITFT/src/User/Hal -ITFT/src/User/Hal/STM32_USB_HOST_Library/Core/inc -ITFT/src/User/Hal/STM32_USB_HOST_Library/Class/MSC/inc -ITFT/src/User/Hal/STM32_USB_HOST_Library/Usr/inc -ITFT/src/User/Hal/STM32_USB_OTG_Driver/inc -DSOFTWARE_VERSION=24.2 //keep this version unchanged.

It also could be because Visual Studio Code was automatically update some thing. Please let me know if you have similar problem and how to resolved it. The change I made to the code is so minor. I don't think that is the reason that the firmware can not be loaded. I also check the hardware and firmware version and they appeared to be correct. Thanks TP

Hukuma1 commented 4 years ago

Had this issue on the TFT35 myself. But then they pushed the last commit about an hour ago. It fixed it for me. Can you try again?

https://github.com/bigtreetech/BIGTREETECH-TouchScreenFirmware/commit/aa773a140a29b27de7dbabebd0a06bb38336fa5e is the commit that fixed it for me.

tphan26363 commented 4 years ago

It may fix for TFT-35 But not for TFT-24. I just download a couple minutes ago and it is no joy. TP

thisiskeithb commented 4 years ago

Can any other TFT24 users who compiled their firmware confirm this issue?

Don't forget to update PIO and clean your libraries/delete you .PIO folder before exporting.

tphan26363 commented 4 years ago

Did all the clean up the build folder and Update PIO. Still no joy.

tphan26363 commented 4 years ago

Also there are many warning as below when build. I don't think it is serious issue though.

TFT\src\User\Menu\Print.c: In function 'gocdeListDraw': TFT\src\User\Menu\Print.c:98:10: warning: implicit declaration of function 'bmpDecode' [-Wimplicit-function-declaration] if(bmpDecode(strcat(gnew,"_70.bmp"), ICON_ADDR(ICON_PREVIEW+i))) ^~~~~ stm32cube\f1\Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_can.c: In function 'HAL_CAN_GetTxTimestamp': C:\users\tphan.platformio\packages\framework-stm32cube\f1\Drivers\CMSIS\Device\ST\STM32F1xx\Include/stm32f1xx.h:210:32: warning: implicit declaration of function '__CLZ' [-Wimplicit-function-declaration]

define POSITION_VAL(VAL) (CLZ(RBIT(VAL)))

                            ^

stm32cube\f1\Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_can.c:1097:23: note: in expansion of macro 'POSITION_VAL' transmitmailbox = POSITION_VAL(TxMailbox); ^~~~

C:\users\me.platformio\packages\framework-stm32cube\f1\Drivers\CMSIS\Device\ST\STM32F1xx\Include/stm32f1xx.h:210:32: warning: implicit declaration of function '__CLZ' [-Wimplicit-function-declaration]

define POSITION_VAL(VAL) (CLZ(RBIT(VAL)))

                            ^

C:\users\me.platformio\packages\framework-stm32cube\f1\Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_pwr.c:114:92: note: in expansion of macro 'POSITION_VAL'

define CSR_EWUP_BB(VAL) ((uint32_t)(PERIPH_BB_BASE + (PWR_CSR_OFFSET_BB 32U) + (POSITION_VAL(VAL) 4U)))

                                                                                        ^~~~~~~~~~~~

C:\users\me.platformio\packages\framework-stm32cube\f1\Drivers\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_pwr.c:403:22: note: in expansion of macro 'CSR_EWUP_BB' (__IO uint32_t ) CSR_EWUP_BB(WakeUpPinx) = (uint32_t)ENABLE;

thisiskeithb commented 4 years ago

Those warnings were from a previous version of firmware. Download a fresh copy and try compiling again.

thisiskeithb commented 4 years ago

@tphan26363: Does this binary work? BIGTREE_TFT24_V1.1.24.2.bin.zip

tphan26363 commented 4 years ago

The original binary work but the one I try to recompile does not work since I want to change to dual extruder

thisiskeithb commented 4 years ago

@tphan26363: Can you try the one I uploaded? I compiled it today.

tphan26363 commented 4 years ago

Ha. I download the zip it does not work so I used GitHub Desktop, It works. guess they did not update the zip file. Thanks every body TP

tphan26363 commented 4 years ago

@thisiskeithb It does work. TP

github-actions[bot] commented 6 months ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.