Skip to content

Commit

Permalink
Debug firmware, deploy settings
Browse files Browse the repository at this point in the history
  • Loading branch information
omersiar committed Sep 26, 2018
1 parent fd975ec commit 7d5d054
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 23 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ src/websrc/gzipped

bin/generic.bin
bin/forV2Board.bin
bin/debug.bin

# node js

Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ install:

script:
- pio --version
- pio run -e deploy -e relayboard
- pio run -e generic -e relayboard -e debug

before_deploy:
- cd ..
Expand Down
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# Change Log
All notable changes to this project will be documented in this file.

## [Unreleased]
## [0.9.0] Unreleased
#### Added
- [firmware] Support for RDM6300 RFID readers (125kHz, UART) #163 @arduino12


## [0.8.2] 2018-09-05
#### Added
Expand Down
17 changes: 11 additions & 6 deletions platformio.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[platformio]
env_default = generic
src_build_flags = !echo "-DBUILD_TAG="$TRAVIS_TAG

[common]
platform = https://github.com/platformio/platform-espressif8266.git
Expand All @@ -22,10 +23,12 @@ framework = arduino
board = esp12e
upload_resetmethod = nodemcu
lib_deps = ${common.lib_deps}
extra_scripts = scripts/GENdeploy.py
build_flags = -Wl,-Teagle.flash.4m.ld
upload_speed = 921600
monitor_speed = 115200

; official ESP-RFID board (V2)
[env:relayboard]
board_build.f_cpu = 160000000L
platform = ${common.platform}
Expand All @@ -38,13 +41,15 @@ extra_scripts = scripts/OBdeploy.py
upload_speed = 921600
monitor_speed = 115200

; for Travis CI deployment
[env:deploy]
; generic firmware for debugging purposes
[env:debug]
board_build.f_cpu = 160000000L
platform = ${common.platform}
framework = arduino
board = esp12e
lib_deps = ${common.lib_deps}
extra_scripts = scripts/GENdeploy.py
build_flags = -Wl,-Teagle.flash.4m.ld
src_build_flags = !echo "-DBUILD_TAG="$TRAVIS_TAG
lib_deps = ${common.lib_deps}
build_flags = -Wl,-Teagle.flash.4m.ld
-DDEBUG
extra_scripts = scripts/DBGdeploy.py
upload_speed = 921600
monitor_speed = 115200
18 changes: 18 additions & 0 deletions scripts/DBGdeploy.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Import("env")
import shutil
import os
#
# Dump build environment (for debug)
# print env.Dump()
#

#
# Upload actions
#

def after_build(source, target, env):
shutil.copy(firmware_source, 'bin/debug.bin')

env.AddPostAction("buildprog", after_build)

firmware_source = os.path.join(env.subst("$BUILD_DIR"), "firmware.bin")
39 changes: 24 additions & 15 deletions src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,16 +1,26 @@
/*
Authors : Ömer Şiar Baysal
ESP-RFID Community
Released to Public Domain
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
MIT License
Copyright (c) 2018 esp-rfid Community
Copyright (c) 2017 Ömer Şiar Baysal
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/

#include "Arduino.h"
Expand Down Expand Up @@ -66,9 +76,8 @@ int relayPin;
#include "webh/index.html.gz.h"

#ifdef ESP8266
extern "C"
{
#include "user_interface.h"
extern "C" {
#include "user_interface.h"
}
#endif

Expand Down

0 comments on commit 7d5d054

Please sign in to comment.