Ebiroll / esp32_blackmagic

esp32 wifi debugger for ARM Cortex microcontrollers https://github.com/blacksphere/blackmagic
75 stars 2 forks source link

Problems compiling using latest esp32-idf #4

Closed davidtgbe closed 4 years ago

davidtgbe commented 4 years ago

Hello, I'm trying to use esp32 as a BMP and found this. I'm having troubles trying to compile with latest esp32-idf. Tried on platform.io on windows, through cmd.exe and with ubuntu with no success. Problems with MakeFile and not existing CMakeLists.txt, with the instructions regarding the compile command (build_esp32.h / idf.py build) and so on. It must be very simple to fix/update the proper files and instructions (supposing i'm not doing anything wrong), so, could someone please help? Thanks!

Things I've done:

Had to change platfom.ini

; PlatformIO Project Configuration File
;
;   Build options: build flags, source filter
;   Upload options: custom upload port, speed and extra flags
;   Library options: dependencies, extra library storages
;   Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html

[platformio]
src_dir = main
lib_dir = components

[env:esp32dev]
platform = espressif32
src_dir = main
lib_dir = components
board = esp32dev
framework = espidf
lib_deps_dir = target

And tasks.json

{
    "version": "2.0.0",
    "command": "/usr/bin/bash",
    "args": ["-c"],
    "type": "shell",
    "presentation" : { "reveal": "always" },
    "options": {
        "cwd": "${workspaceRoot}",
    },
    "tasks": [
        {
            "label": "build app",
            "args": ["/usr/bin/make app"],
            "group": "build",
            "problemMatcher": {
                "owner": "cpp",
                "fileLocation": "absolute",
                "pattern": {
                    "regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
                    "file": 1,
                    "line": 2,
                    "column": 3,
                    "severity": 4,
                    "message": 5
                }
            }
        },
        {
            "label": "clean app",
            "args": ["make app-clean"]
        },
        {
            "label": "monitor",
            "args": ["make monitor"]
        },
        {
            "label": "flash app",
            "args": ["make app-flash"]
        }
    ]
}

build_log.txt

Ebiroll commented 4 years ago

For latest version. Clone this https://github.com/Ebiroll/blackmagic Then follow intructions in src/platforms/esp32. Not sure how well it will work in windows though.

Ebiroll commented 4 years ago

I have commited fixes to allow compile with platform Io but only with version 3.3 of esp-idf

davidtgbe commented 4 years ago

So, I have to use version 3.3 only for platform.io, understood.

Ebiroll commented 4 years ago

Yes. I had some Issues building with platform.io with the latest esp-idf. But both versions worked for me. I also added possibility to use JTAG and updated to latest version of the original BMP code. Have not been able to test JTAG yet.

davidtgbe commented 4 years ago

I've been fighting to build it but had no luck. Neither with platform.io, nor Ubuntu wsl under Windows with esp-idf v3. 3 / 4.0... Bmp code builds fine, but when I rebase your code and main original branch, then, problems arise, related with all esp-idf toolchain I guess. https://pastebin.com/SHPaZ38q I think it is a problem on my side, but would appreciate if you could take a look at the pastebin and tell me what I'm missing. Thank you.

Ebiroll commented 4 years ago

Close but no cigar. With cmake you need the latest version of esp-idf. Maybe the latest released version also works. (4.1) Then do 3.3 worked with platform.io for me.

. ~/esp/esp-idf/setup.sh cd src/platforms/esp32

Check the platform.h files amd make sure that the pins are OK.

check main.c for password and SSID of your wifi

Run build script.

build-esp32.sh Uplload with run-esp.sh

davidtgbe commented 4 years ago

Finally, I've managed to build it. I had to:

Thanks for all!