openshwprojects / OpenBK7231T_App

Open source firmware (Tasmota/Esphome replacement) for BK7231T, BK7231N, BL2028N, T34, XR809, W800/W801, W600/W601, BL602 and LN882H
https://openbekeniot.github.io/webapp/devicesList.html
1.48k stars 276 forks source link

Git conflict #301

Closed valeklubomir closed 2 years ago

valeklubomir commented 2 years ago

file src/driver/drv_ir.cpp is not compiled Debug/obj/drv_ir.cpp: No such file or directory

clean erases this file and compilation if successful, but git status report deleted file.

Extension CPP somehow is not considered as source file.

btsimonh commented 2 years ago

yep, working on it. see https://github.com/openshwprojects/OpenBK7231T_App/pull/281

btsimonh commented 2 years ago

p.s. for local T dev, ensure to pull latest T SDK.

valeklubomir commented 2 years ago

I am working with N version. Don't have any T device to work with. Can you not rename it simple C?

openshwprojects commented 2 years ago

IRRemote is a C++ library. Someone needs to backport those C++-enabling changes to N: https://github.com/openshwprojects/OpenBK7231T/commits/master @btsimonh might do it later?

btsimonh commented 2 years ago

looking at it quickly now. @valeklubomir - I'll point you to a branch to test, may be a few minutes...

valeklubomir commented 2 years ago

When I delete drv_ir.cpp N build works. No need to hurry. I keep in mind that not to commit deletion to git.

openshwprojects commented 2 years ago

@valeklubomir I am afraid that my next commit will break your compilation, unless you comment out IR line here: image

valeklubomir commented 2 years ago

Link it to T version only

if PLATFORM_BK7231T

Or downgrade to C

btsimonh commented 2 years ago

@valeklubomir - please can you test the mods in the SDK here: https://github.com/btsimonh/tuya-iotos-embeded-sdk-wifi-ble-bk7231n/tree/AddCPPSupport

valeklubomir commented 2 years ago

tuya-iotos-embeded-sdk-wifi-ble-bk7231n/platforms/bk7231n/bk7231n_os/beken378/func/lwip_intf/lwip-2.1.3/port/ethernetif.c:140: undefined reference to `CFG_GetDeviceName'

valeklubomir commented 2 years ago

Sorry wrong name for APP. But drv_ir.cpp still does not compile. arm-none-eabi-gcc: error: Debug/obj/drv_ir.cpp: No such file or directory When I execute clean ./build_app.sh apps/OpenBK7231N_App OpenBK7231N_App 1.0.2 clean

drv_ir.cpp is deleted and next build works.

openshwprojects commented 2 years ago

@valeklubomir don't you need to do the same as me before, the update-submodules?

edit: will push some improvements and removal of some warnings

btsimonh commented 2 years ago

deleted from debug? or deleted from source folder? It could be that the stuff from the previous (bad) build in debug caused a problem... I hate the way they have done that....

valeklubomir commented 2 years ago

Deleted from source directory by clean command.

valeklubomir commented 2 years ago

When I checkout fresh OpenBK7231T_App from git into app/OpenBK7231N_APP and execute script ./b_rebuild.sh It resulted with: arm-none-eabi-gcc: error: Debug/obj/drv_ir.cpp: No such file or directory

src/driver/drv_ir.cpp is in the repositiory.

When I execute script: ./b_full.sh which first call clean, then the build is successfully completed and binary is created.

after this src/driver/drv_ir.cpp is deleted and git status report it. With next commit file would be removed from repository.

I don't use make from App. It work only for N and T, other platforms fails, and it take time to build all of them. Don't know why. At moment I work only with N versions. Do not have any other device for real testing then BK7231N

openshwprojects commented 2 years ago

I pushed some fixes and warning removal (not all yet).

@valeklubomir , depending whether we can resolve N build, I might make IR driver T-only so you don't have troubles compiling..

At the current state of things, the local Windows PC build works for me for T platform, while building with cygwin.

btsimonh commented 2 years ago

please can you check that application.mk definitely includes the line: SRC_CPP += $(foreach dir, $(TY_SRC_DIRS), $(wildcard $(dir)/*.cpp))

remember, for local build, you probably have the SDK in use being outside of the OpenBeken folder:

image

NOT the SDKs inside the app folder?

valeklubomir commented 2 years ago

No entry SRC_CPP in any SDK openshwprojects/OpenBK7231T openshwprojects/OpenBK7231N btsimonh/tuya-iotos-embeded-sdk-wifi-ble-bk7231n/tree/AddCPPSupport

btsimonh commented 2 years ago

https://github.com/btsimonh/tuya-iotos-embeded-sdk-wifi-ble-bk7231n/blob/AddCPPSupport/platforms/bk7231n/bk7231n_os/application.mk

line 1106?

btsimonh commented 2 years ago

(we are just checking a github automated build...)

@valeklubomir - tripple check your checkouts of the SDK. The main branch of the N SDK has now been updated...

@openshwprojects - builds on github with new SDK. but fails at: Debug/obj/heap_4.o Debug/obj/queue.o Debug/obj/tasks.o Debug/obj/timers.o Debug/obj/rtos_pub.o Debug/obj/drv_ir.o -L./beken378/lib/ -lrwnx -L./beken378/lib/ -lble -lstdc++ -T./beken378/build/bk7231n_ota.ld Debug/obj/drv_main.o:(.data.g_drivers+0xc4): undefined reference to DRV_IR_Init' Debug/obj/drv_main.o:(.data.g_drivers+0xc8): undefined reference toDRV_IR_RunFrame' collect2: error: ld returned 1 exit status

suspect one for you to solve in the app for N?

valeklubomir commented 2 years ago

Needed to checkout diffrent branch. Now it works correctly

btsimonh commented 2 years ago

we got there in the end :) thankyou for your patience!

valeklubomir commented 2 years ago

@btsimonh I ment your repos. Original I receive Debug/obj/drv_main.o:(.data.g_drivers+0xc4): undefined reference to DRV_IR_Init' Debug/obj/drv_main.o:(.data.g_drivers+0xc8): undefined reference to DRV_IR_RunFrame' collect2: error: ld returned 1 exit status

btsimonh commented 2 years ago

I think this is WIP ref @openshwprojects - i.e. although the functions are in the drv_ir.cpp, I suspect he needs to add N platform to enable them for you too. (look at #defines?). Just shut down my OpenBeken dev laptop.... so can't check.

looking direct at github, the whole file has #if PLATFORM_BK7231T around it.

try:

if PLATFORM_BK7231T || PLATFORM_BK7231N

that may work :).

btsimonh commented 2 years ago

or

if PLATFORM_BEKEN

valeklubomir commented 2 years ago

Now I can build it with N version Fixed drv_ir.h (optional for future CPP sources) removed #if PLATFORM_BK7231T from drv_ir.cpp Linker script. added __exidx_start, __exidx_end

openshwprojects commented 2 years ago

I was out for a 15 minutes or so, @valeklubomir if that's a fix can you submit a pull request?

btsimonh commented 2 years ago

"removed #if PLATFORM_BK7231T from drv_ir.cpp" it probably needs

if PLATFORM_BEKEN

else other builds may break.

openshwprojects commented 2 years ago

@valeklubomir ah ok, pushed fix. Now I will start working on IR API