This guide covers NetBurner makefile integration, generated web assets, and clean build practices for NetBurner_MSSQL_Client.
libraries/TDSLite/library.mak is included by your project when LIBS_TDSLITE := 1:
TDSLITE_ROOT ?= /path/to/NetBurner_MSSQL_Client
LIBS_TDSLITE := 1
include $(TDSLITE_ROOT)/libraries/TDSLite/library.makIt only adds include paths — no separate link step.
examples/NetBurner_MSSQL_Client/makefile defines:
PLATFORM— target module (defaultNANO54415)TDSLITE_ROOT— relative path to repo root (../..)- Source list including
web.cpp,sql_runtime.cpp, etc. - HTML/CSS inputs for comphtml
- Standard NetBurner include of
boilerplate.mk
make PLATFORM=NANO54415 # Build release binary
make PLATFORM=NANO54415 clean # Remove obj/ and generated htmldata
make PLATFORM=NANO54415 load DEVIP=x.x.x.x # Flash deviceOutput binary:
obj/release/NetBurner_MSSQL_Client.bin
NetBurner compiles HTML into C++ source:
html/*.html + html/style.css → comphtml → src/htmldata.cpp
- Do not edit
htmldata.cppmanually — changes are overwritten every build - Do not commit
htmldata.cpp— listed in.gitignore - If web pages look stale after HTML edits, rebuild (or
touchHTML and rebuild)
CPPCALL symbols in HTML must match registered function names in web.cpp exactly.
Object files under obj/ are CPU- and optimization-specific. When changing PLATFORM across:
- ColdFire (big-endian) ↔ ARM (little-endian)
- Different module families
Always run:
make clean
make PLATFORM=<new-platform>Mixing objects causes link errors or subtle runtime bugs.
Typical entries (see root .gitignore):
| Path | Reason |
|---|---|
obj/ |
Build output |
src/htmldata.cpp |
Generated |
*.tmp, scratch HTML |
Local dev files |
| IDE / OS cruft | .vs/, Thumbs.db, etc. |
A clean clone should build without preexisting obj/ or htmldata.cpp.
The example uses NetBurner boilerplate defaults plus C++11 for tdslite:
-std=c++11-fno-exceptions-fno-rtti
Optional debug:
CFLAGS += -DTDS_DEBUG=1Every .cpp that includes TDSLite/tdslite.h instantiates template code from tdslite. Keep includes in few translation units if code size matters:
- One
.cppfor all SQL/driver work (as the example does withsql_runtime.cpp) - Web layer includes only runtime headers, not full tdslite
Requirements:
NNDK_ROOTenvironment variable set- Network not required for compile (only for
load) - Run from example directory with explicit
PLATFORM
Example:
export NNDK_ROOT=/opt/netburner/ndk
cd examples/NetBurner_MSSQL_Client
make clean
make PLATFORM=NANO54415Verify exit code 0 and binary presence under obj/release/.
| Error | Likely cause |
|---|---|
TDSLite/tdslite.h: No such file |
TDSLITE_ROOT wrong or library.mak not included |
| comphtml / CPPCALL undefined | HTML references function not implemented in web.cpp |
| Duplicate symbol in htmldata | Duplicate HTML route names |
| C++ template errors in tdslite | Missing -std=c++11 or exceptions enabled |
| Link errors after platform change | Stale obj/ — run make clean |
- Getting started — first build and flash
- Web UI — comphtml
%escaping rules - Upstream & patches — header compatibility