Monthly Archives: May 2017

ESP32

ESP-IDF Programming Guide, v2
ESP-IDF Programming Guide, latest

Das Espressif IoT Development Framework ist ein auf FreeRTOS und lwIP basiertes

Entwicklungssystem für den ESP32.

ESP-IDF, multicore & freeRTOS confusion
To sum up my assumptions about ESP32 I make, when asking this question:

  • ESP32 contains two identical cores, one is PRO_CPU and the second is APP_CPU.
  • Application entry points on both CPUs (start_cpu0 and start_cpu1) are weak functions.
  • However some useful parts of ESP-IDF are written or configured to use FreeRTOS synchronisation and locking primitives.
  • ESP-IDF is build on top FreeRTOS. That means that handling of WiFi and other stuff is handled as RTOS task.
  • ESP-IDF is the lowest-possible API officially supported

The Internet of Things with ESP32
ESP32 Overview

Installation

Standard Setup of Toolchain for Linux

sudo usermod -a -G dialout $USER && \
sudo apt-get install git wget make libncurses-dev \
flex bison gperf python python-serial && \
wget https://bootstrap.pypa.io/get-pip.py && \
sudo python get-pip.py && \
sudo pip install pyserial && \
mkdir -p ~/Arduino/hardware/espressif && \
cd ~/Arduino/hardware/espressif && \
git clone https://github.com/espressif/arduino-esp32.git esp32 && \
cd esp32/tools/ && \
python get.py

Shop

WEMOS LOLIN32 V1.0.0

SourceCode

Espressif IoT Development Framework
Hello World Example
Arduino core for ESP32 WiFi chip
Espconn based on lwip on esp32

Hardware

Espressif ESP32 WROVER KIT, Adafruit
LOLIN32 – A wifi&bluetooth board based ESP-32

FreeRTOS

vTaskDelay

Ethernet

ESP32 Monster board, Ether, CAN, OLED all in one
>ESP32 Monster board, Pinout & schematic
GRANDE ESP32 Monster board
kodera2t/ESP32_OLED_LAN8720_sample
Enabling Ethernet On The ESP32
Ethernet on ESP32 using LAN8720
WaveShare Ethernet
WaveShare Wiki – LAN8720 ETH Board
WaveShare Wiki – DP83848 Ethernet Board
ESP32-EVB: Development-Board mit WLAN und Ethernet
Olimex ESP32-EVB
An ESP32 board with ethernet support (LAN8720A)
espressif/esp-idf » Add LAN8720 phy support
[info] ESP32-EVB board for IoT with Ethernet 100Mb interface..

Bluetooth

Wikipedia: Bluetooth stack
Android Bluetooth
BlueZ vs Bluedroid bluetooth stack
Bluedroid stack in android

Arduino

Sparkfun ESP32 Thing Hookup Guide
makeEspArduino – A makefile for ESP8266 and ESP32 Arduino projects

Deep-Sleep

System API » Deep Sleep
API Guides » Deep Sleep Wake Stubs

YouTube

pcbreflux’s ESP32 Playlist

Tutorials

ESP-IDF Programming Guide
Get Started (ESP IDF, official, latest)

Debug

Debugging – OpenOCD setup for ESP32
TIAO USB Multi-Protocol Adapter (JTAG, SPI, I2C, Serial) (FT2232H)
TIAO USB Multi Protocol Adapter User’s Manual
Flyswatter2 (FT2232H)
FT2232H – Hi-Speed Dual USB UART/FIFO IC

ESP32 – building the toolchain for Linux (Ubuntu)

Hands-On the Hot New WeMos ESP-32 Breakout
mikrocontroller.net/articles/ESP32
ESP32 – building the toolchain for Linux (Ubuntu)
ESP32 (8) – tcp connection
Enginursday: First Impressions of the ESP32
exploreembedded.com – Wiki
exploreembedded.com – Hello World with ESP32 Explained
ESP32 – FIRST STEPS

Closed-Source Libraries

./esp-idf/components/bt/lib/libbtdm_app.a
./esp-idf/components/newlib/lib/libm.a
./esp-idf/components/newlib/lib/libc_nano.a
./esp-idf/components/newlib/lib/libg.a
./esp-idf/components/newlib/lib/libc.a
./esp-idf/components/esp32/libhal.a
./esp-idf/components/esp32/lib/libnet80211.a
./esp-idf/components/esp32/lib/libwpa2.a
./esp-idf/components/esp32/lib/libwps.a
./esp-idf/components/esp32/lib/libwpa.a
./esp-idf/components/esp32/lib/libsmartconfig.a
./esp-idf/components/esp32/lib/libphy.a
./esp-idf/components/esp32/lib/libcore.a
./esp-idf/components/esp32/lib/libcoexist.a
./esp-idf/components/esp32/lib/librtc.a
./esp-idf/components/esp32/lib/libpp.a

Books

SparkFun ESP32 Thing Development Workshop, von Agus Kurniawan
Kolban’s book on ESP32, von Neil Kolban

Dual-Core => Mutex + Semaphores

Use of dual core
components/driver/rmt: portENTER_CRITICAL called from ISR context
esp-idf/components/freertos/include/freertos/portmacro.h

portMUX_TYPE adc_spinlock = portMUX_INITIALIZER_UNLOCKED;

portENTER_CRITICAL(&adc_spinlock);
[...]
portEXIT_CRITICAL(&adc_spinlock);

FAQ

Linker fails: libraries not found

$ xtensa-esp32-elf-gcc test.c
/opt/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld: cannot find crt1-sim.o: No such file or directory
/opt/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld: cannot find _vectors.o: No such file or directory
/opt/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld: cannot find -lsim
/opt/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld: cannot find -lhandlers-sim
/opt/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld: cannot find -lhal
collect2: error: ld returned 1 exit status

Program Structure

General Notes About ESP-IDF Programming,
Build System, Makefile structure

  • PRO CPU = cpu0
  • APP CPU = cpu1
$ grep -r start_cpu0
[...]
components/bootloader/src/main/bootloader_start.c:void IRAM_ATTR call_start_cpu0()
components/bootloader/src/main/esp32.bootloader.ld:ENTRY(call_start_cpu0);
components/esp32/ld/esp32.common.ld:ENTRY(call_start_cpu0);
components/esp32/cpu_start.c:void start_cpu0(void) __attribute__((weak, alias("start_cpu0_default")));
components/esp32/cpu_start.c:void start_cpu0_default(void) IRAM_ATTR;
components/esp32/cpu_start.c:void IRAM_ATTR call_start_cpu0()
components/esp32/cpu_start.c:    start_cpu0();
components/esp32/cpu_start.c:void start_cpu0_default(void)
components/spi_flash/cache_utils.c:        // called from the 2nd stage bootloader or from user_start_cpu0, i.e. from
make/project.mk:	-u call_user_start_cpu0	\
[...]

$ grep -r component.mk
[...]
make/project.mk:# This Makefile is included directly from the user project Makefile in order to call the component.mk
make/project.mk:# A component is buildable if it has a component.mk makefile in it
make/project.mk:COMPONENT_PATHS_BUILDABLE := $(foreach cp,$(COMPONENT_PATHS),$(if $(wildcard $(cp)/component.mk),$(cp)))
make/project.mk:# stored in COMPONENT_LINKER_DEPS, built via component.mk files' COMPONENT_ADD_LINKER_DEPS variable
make/project.mk:+$(MAKE) -C $(BUILD_DIR_BASE)/$(2) -f $(IDF_PATH)/make/component_wrapper.mk COMPONENT_MAKEFILE=$(1)/component.mk COMPONENT_NAME=$(2)
make/project.mk:$(BUILD_DIR_BASE)/$(2)/component_project_vars.mk: $(1)/component.mk $(COMMON_MAKEFILES) $(SDKCONFIG_MAKEFILE) | $(BUILD_DIR_BASE)/$(2)
[...]

components/bootloader/src/main/esp32.bootloader.ld (Second stage bootloader)
==================================================
ENTRY(call_start_cpu0);

components/bootloader/src/main/bootloader_start.c (Second stage bootloader)
=================================================
void IRAM_ATTR call_start_cpu0()
void bootloader_main()
static void set_cache_and_start_app([...])
    entry_t entry = ((entry_t) entry_addr);
    (*entry)();

components/esp32/cpu_start.c (Application startup)
============================
void start_cpu0(void) __attribute__((weak, alias("start_cpu0_default")));
void start_cpu0_default(void) IRAM_ATTR;

void IRAM_ATTR call_start_cpu0()
void start_cpu0(void) => default!
void start_cpu0_default(void)
    xTaskCreatePinnedToCore(&main_task, "main",
            ESP_TASK_MAIN_STACK, NULL,
            ESP_TASK_MAIN_PRIO, NULL, 0);
static void main_task(void* args)
app_main();

$ grep -r call_start_cpu1 .
[...]
./components/esp32/cpu_start.c:static void IRAM_ATTR call_start_cpu1();
./components/esp32/cpu_start.c:    ESP_EARLY_LOGI(TAG, "Starting app cpu, entry point is %p", call_start_cpu1);
./components/esp32/cpu_start.c:    ets_set_appcpu_boot_addr((uint32_t)call_start_cpu1);
./components/esp32/cpu_start.c:void IRAM_ATTR call_start_cpu1()

$ grep -r ets_set_appcpu_boot_addr .
./components/esptool_py/esptool/flasher_stub/rom_32.ld:PROVIDE ( ets_set_appcpu_boot_addr = 0x4000689c );
./components/bootloader/src/main/bootloader_start.c:    ets_set_appcpu_boot_addr(0); 
./components/esp32/ld/esp32.rom.ld:PROVIDE ( ets_set_appcpu_boot_addr = 0x4000689c );
./components/esp32/cpu_start.c:    ets_set_appcpu_boot_addr((uint32_t)call_start_cpu1);
./components/esp32/cpu_start.c:    ets_set_appcpu_boot_addr(0);
./components/esp32/include/rom/ets_sys.h:void ets_set_appcpu_boot_addr(uint32_t start);

FreeRTOS SMP-aware

esp-idf/components/freertos/readme_smp.txt
Interrupts:

  • Enabling and disabling interrupts will only affect the current core.
  • Use a mux, queue or semaphore to protect your structures instead.
$ grep -r xTaskCreatePinnedToCore
[...]
./components/freertos/include/freertos/task.h:    BaseType_t xTaskCreatePinnedToCore(	TaskFunction_t pxTaskCode,
./components/freertos/include/freertos/task.h:#define xTaskCreate( pvTaskCode, pcName, usStackDepth, pvParameters, uxPriority, pxCreatedTask ) xTaskCreatePinnedToCore( ( pvTaskCode ), ( pcName ), ( usStackDepth ), ( pvParameters ), ( uxPriority ), ( pxCreatedTask ), tskNO_AFFINITY )
[...]
components/freertos/tasks.c:	BaseType_t xTaskCreatePinnedToCore(	TaskFunction_t pxTaskCode,
components/freertos/tasks.c:			xReturn = xTaskCreatePinnedToCore( prvIdleTask, "IDLE", tskIDLE_STACK_SIZE, ( void * ) NULL, ( tskIDLE_PRIORITY | portPRIVILEGE_BIT ), &xIdleTaskHandle[i], i ); /*lint !e961 MISRA exception, justified as it is not a redundant explicit cast to all supported compilers. */
[...]

MyApp

$ git clone https://github.com/espressif/esp-idf-template.git myapp
$ cd myapp
$ make menuconfig
make[1]: Entering directory '/home/andreas/esp32/esp-idf/tools/kconfig'
cc  -D_GNU_SOURCE -DCURSES_LOC="<ncurses.h>" -DLOCALE   -c -o mconf.o mconf.c
flex -L -P zconf -o zconf.lex.c zconf.l
zconf.l:255: warning, -s option given but default rule can be matched
bison -t -l -p zconf -o zconf.tab.c zconf.y
sed -E "s/\\x0D$//" zconf.gperf | gperf -t --output-file zconf.hash.c -a -C -E -g -k '1,3,$' -p -t
cc  -D_GNU_SOURCE -DCURSES_LOC="<ncurses.h>" -DLOCALE   -c -o zconf.tab.o zconf.tab.c
lxdialog/check-lxdialog.sh -check cc  -D_GNU_SOURCE -DCURSES_LOC="<ncurses.h>" -DLOCALE -lncurses -ltinfo
cc  -D_GNU_SOURCE -DCURSES_LOC="<ncurses.h>" -DLOCALE   -c -o lxdialog/checklist.o lxdialog/checklist.c
cc  -D_GNU_SOURCE -DCURSES_LOC="<ncurses.h>" -DLOCALE   -c -o lxdialog/util.o lxdialog/util.c
cc  -D_GNU_SOURCE -DCURSES_LOC="<ncurses.h>" -DLOCALE   -c -o lxdialog/inputbox.o lxdialog/inputbox.c
cc  -D_GNU_SOURCE -DCURSES_LOC="<ncurses.h>" -DLOCALE   -c -o lxdialog/textbox.o lxdialog/textbox.c
cc  -D_GNU_SOURCE -DCURSES_LOC="<ncurses.h>" -DLOCALE   -c -o lxdialog/yesno.o lxdialog/yesno.c
cc  -D_GNU_SOURCE -DCURSES_LOC="<ncurses.h>" -DLOCALE   -c -o lxdialog/menubox.o lxdialog/menubox.c
cc -o mconf mconf.o zconf.tab.o lxdialog/checklist.o lxdialog/util.o lxdialog/inputbox.o lxdialog/textbox.o lxdialog/yesno.o lxdialog/menubox.o -lncurses -ltinfo
cc  -D_GNU_SOURCE -DCURSES_LOC="<ncurses.h>" -DLOCALE   -c -o conf.o conf.c
cc -o conf conf.o  zconf.tab.o -lncurses -ltinfo
make[1]: Leaving directory '/home/andreas/esp32/esp-idf/tools/kconfig'
MENUCONFIG
configuration written to /home/andreas/esp32/apps/myapp/sdkconfig

*** End of the configuration.
*** Execute 'make' to start the build or try 'make help'.

GENCONFIG

$ make
CC src/bootloader_flash.o
CC src/efuse.o
CC src/secure_boot.o
CC src/secure_boot_signatures.o
CC src/flash_partitions.o
CC src/esp_image_format.o
CC src/flash_encrypt.o
CC src/bootloader_random.o
AR libbootloader_support.a
CC log.o
AR liblog.a
CC spi_flash_rom_patch.o
AR libspi_flash.a
CC micro-ecc/uECC.o
AR libmicro-ecc.a
CC esp32/rtc_pm.o
CC esp32/cpu_util.o
CC esp32/brownout.o
CC esp32/rtc_time.o
CC esp32/rtc_init.o
CC esp32/rtc_sleep.o
CC esp32/rtc_clk.o
AR libsoc.a
CC bootloader_start.o
CC flash_qio_mode.o
AR libmain.a
LD bootloader.elf
esptool.py v2.0.1
Building partitions from /home/andreas/esp32/esp-idf/components/partition_table/partitions_singleapp.csv...
CC app_trace_util.o
CC app_trace.o
AR libapp_trace.a
CC esp_ota_ops.o
AR libapp_update.a
CC src/bootloader_flash.o
CC src/efuse.o
CC src/secure_boot.o
CC src/secure_boot_signatures.o
CC src/flash_partitions.o
CC src/esp_image_format.o
CC src/flash_encrypt.o
CC src/bootloader_random.o
AR libbootloader_support.a
CC bt.o
CC bluedroid/bta/dm/bta_dm_api.o
CC bluedroid/bta/dm/bta_dm_sco.o
CC bluedroid/bta/dm/bta_dm_ci.o
CC bluedroid/bta/dm/bta_dm_act.o
CC bluedroid/bta/dm/bta_dm_pm.o
CC bluedroid/bta/dm/bta_dm_main.o
CC bluedroid/bta/dm/bta_dm_cfg.o
CC bluedroid/bta/gatt/bta_gatts_main.o
CC bluedroid/bta/gatt/bta_gattc_cache.o
CC bluedroid/bta/gatt/bta_gattc_main.o
CC bluedroid/bta/gatt/bta_gatts_api.o
CC bluedroid/bta/gatt/bta_gattc_utils.o
CC bluedroid/bta/gatt/bta_gattc_ci.o
CC bluedroid/bta/gatt/bta_gattc_act.o
CC bluedroid/bta/gatt/bta_gattc_api.o
CC bluedroid/bta/gatt/bta_gatts_act.o
CC bluedroid/bta/gatt/bta_gatts_utils.o
CC bluedroid/bta/hh/bta_hh_api.o
CC bluedroid/bta/hh/bta_hh_utils.o
CC bluedroid/bta/hh/bta_hh_le.o
CC bluedroid/bta/hh/bta_hh_act.o
CC bluedroid/bta/hh/bta_hh_main.o
CC bluedroid/bta/hh/bta_hh_cfg.o
CC bluedroid/bta/sdp/bta_sdp.o
CC bluedroid/bta/sdp/bta_sdp_act.o
CC bluedroid/bta/sdp/bta_sdp_cfg.o
CC bluedroid/bta/sdp/bta_sdp_api.o
CC bluedroid/bta/av/bta_av_api.o
CC bluedroid/bta/av/bta_av_ssm.o
CC bluedroid/bta/av/bta_av_cfg.o
CC bluedroid/bta/av/bta_av_ci.o
CC bluedroid/bta/av/bta_av_act.o
CC bluedroid/bta/av/bta_av_main.o
CC bluedroid/bta/av/bta_av_sbc.o
CC bluedroid/bta/av/bta_av_aact.o
CC bluedroid/bta/ar/bta_ar.o
CC bluedroid/bta/sys/bta_sys_main.o
CC bluedroid/bta/sys/utl.o
CC bluedroid/bta/sys/bta_sys_conn.o
CC bluedroid/btcore/bdaddr.o
CC bluedroid/btif/bta_gatts_co.o
CC bluedroid/btif/bta_dm_co.o
CC bluedroid/btif/bta_gattc_co.o
CC bluedroid/device/interop.o
CC bluedroid/device/controller.o
CC bluedroid/gki/gki_ulinux.o
CC bluedroid/gki/gki_buffer.o
CC bluedroid/hci/buffer_allocator.o
CC bluedroid/hci/hci_hal_h4.o
CC bluedroid/hci/hci_packet_parser.o
CC bluedroid/hci/packet_fragmenter.o
CC bluedroid/hci/hci_layer.o
CC bluedroid/hci/hci_packet_factory.o
CC bluedroid/main/bte_main.o
CC bluedroid/main/bte_init.o
CC bluedroid/osi/future.o
CC bluedroid/osi/hash_map.o
CC bluedroid/osi/fixed_queue.o
CC bluedroid/osi/allocator.o
CC bluedroid/osi/config.o
CC bluedroid/osi/list.o
CC bluedroid/osi/hash_functions.o
CC bluedroid/osi/alarm.o
CC bluedroid/osi/buffer.o
CC bluedroid/osi/osi_arch.o
CC bluedroid/external/sbc/decoder/srce/bitstream-decode.o
CC bluedroid/external/sbc/decoder/srce/synthesis-sbc.o
CC bluedroid/external/sbc/decoder/srce/decoder-oina.o
CC bluedroid/external/sbc/decoder/srce/bitalloc.o
CC bluedroid/external/sbc/decoder/srce/framing.o
CC bluedroid/external/sbc/decoder/srce/dequant.o
CC bluedroid/external/sbc/decoder/srce/alloc.o
CC bluedroid/external/sbc/decoder/srce/synthesis-dct8.o
CC bluedroid/external/sbc/decoder/srce/bitalloc-sbc.o
CC bluedroid/external/sbc/decoder/srce/decoder-private.o
CC bluedroid/external/sbc/decoder/srce/synthesis-8-generated.o
CC bluedroid/external/sbc/decoder/srce/framing-sbc.o
CC bluedroid/external/sbc/decoder/srce/oi_codec_version.o
CC bluedroid/external/sbc/decoder/srce/decoder-sbc.o
CC bluedroid/btc/core/btc_util.o
CC bluedroid/btc/core/btc_task.o
CC bluedroid/btc/core/btc_main.o
CC bluedroid/btc/core/btc_dev.o
CC bluedroid/btc/core/btc_storage.o
CC bluedroid/btc/core/btc_ble_storage.o
CC bluedroid/btc/core/btc_sm.o
CC bluedroid/btc/core/btc_profile_queue.o
CC bluedroid/btc/core/btc_alarm.o
CC bluedroid/btc/core/btc_manage.o
CC bluedroid/btc/core/btc_sec.o
CC bluedroid/btc/core/btc_config.o
CC bluedroid/btc/core/btc_dm.o
CC bluedroid/btc/profile/esp/blufi/blufi_prf.o
CC bluedroid/btc/profile/esp/blufi/blufi_protocol.o
CC bluedroid/btc/profile/std/gap/btc_gap_bt.o
CC bluedroid/btc/profile/std/gap/btc_gap_ble.o
CC bluedroid/btc/profile/std/gatt/btc_gatts.o
CC bluedroid/btc/profile/std/gatt/btc_gatt_util.o
CC bluedroid/btc/profile/std/gatt/btc_gattc.o
CC bluedroid/btc/profile/std/a2dp/bta_av_co.o
CC bluedroid/btc/profile/std/a2dp/btc_media_task.o
CC bluedroid/btc/profile/std/a2dp/btc_avk.o
CC bluedroid/btc/profile/std/avrc/btc_avrc.o
CC bluedroid/stack/btm/btm_ble_batchscan.o
CC bluedroid/stack/btm/btm_ble_cont_energy.o
CC bluedroid/stack/btm/btm_sec.o
CC bluedroid/stack/btm/btm_ble.o
CC bluedroid/stack/btm/btm_pm.o
CC bluedroid/stack/btm/btm_ble_adv_filter.o
CC bluedroid/stack/btm/btm_inq.o
CC bluedroid/stack/btm/btm_main.o
CC bluedroid/stack/btm/btm_devctl.o
CC bluedroid/stack/btm/btm_ble_privacy.o
CC bluedroid/stack/btm/btm_acl.o
CC bluedroid/stack/btm/btm_ble_bgconn.o
CC bluedroid/stack/btm/btm_dev.o
CC bluedroid/stack/btm/btm_ble_gap.o
CC bluedroid/stack/btm/btm_ble_multi_adv.o
CC bluedroid/stack/btm/btm_ble_addr.o
CC bluedroid/stack/btm/btm_sco.o
CC bluedroid/stack/btu/btu_hcif.o
CC bluedroid/stack/btu/btu_task.o
CC bluedroid/stack/btu/btu_init.o
CC bluedroid/stack/gap/gap_ble.o
CC bluedroid/stack/gap/gap_conn.o
CC bluedroid/stack/gap/gap_api.o
CC bluedroid/stack/gap/gap_utils.o
CC bluedroid/stack/gatt/gatt_db.o
CC bluedroid/stack/gatt/gatt_cl.o
CC bluedroid/stack/gatt/gatt_attr.o
CC bluedroid/stack/gatt/gatt_main.o
CC bluedroid/stack/gatt/gatt_sr.o
CC bluedroid/stack/gatt/att_protocol.o
CC bluedroid/stack/gatt/gatt_auth.o
CC bluedroid/stack/gatt/gatt_api.o
CC bluedroid/stack/gatt/gatt_utils.o
CC bluedroid/stack/hcic/hciblecmds.o
CC bluedroid/stack/hcic/hcicmds.o
CC bluedroid/stack/l2cap/l2c_ble.o
CC bluedroid/stack/l2cap/l2c_main.o
CC bluedroid/stack/l2cap/l2c_utils.o
CC bluedroid/stack/l2cap/l2c_ucd.o
CC bluedroid/stack/l2cap/l2c_api.o
CC bluedroid/stack/l2cap/l2cap_client.o
CC bluedroid/stack/l2cap/l2c_csm.o
CC bluedroid/stack/l2cap/l2c_link.o
CC bluedroid/stack/l2cap/l2c_fcr.o
CC bluedroid/stack/sdp/sdp_utils.o
CC bluedroid/stack/sdp/sdp_db.o
CC bluedroid/stack/sdp/sdp_discovery.o
CC bluedroid/stack/sdp/sdp_main.o
CC bluedroid/stack/sdp/sdp_server.o
CC bluedroid/stack/sdp/sdp_api.o
CC bluedroid/stack/smp/p_256_curvepara.o
CC bluedroid/stack/smp/smp_api.o
CC bluedroid/stack/smp/smp_utils.o
CC bluedroid/stack/smp/p_256_ecc_pp.o
CC bluedroid/stack/smp/smp_act.o
CC bluedroid/stack/smp/smp_cmac.o
CC bluedroid/stack/smp/smp_keys.o
CC bluedroid/stack/smp/smp_br_main.o
CC bluedroid/stack/smp/aes.o
CC bluedroid/stack/smp/smp_main.o
CC bluedroid/stack/smp/p_256_multprecision.o
CC bluedroid/stack/smp/smp_l2c.o
CC bluedroid/stack/avct/avct_lcb.o
CC bluedroid/stack/avct/avct_lcb_act.o
CC bluedroid/stack/avct/avct_l2c.o
CC bluedroid/stack/avct/avct_api.o
CC bluedroid/stack/avct/avct_ccb.o
CC bluedroid/stack/avrc/avrc_pars_ct.o
CC bluedroid/stack/avrc/avrc_opt.o
CC bluedroid/stack/avrc/avrc_bld_ct.o
CC bluedroid/stack/avrc/avrc_pars_tg.o
CC bluedroid/stack/avrc/avrc_bld_tg.o
CC bluedroid/stack/avrc/avrc_api.o
CC bluedroid/stack/avrc/avrc_utils.o
CC bluedroid/stack/avrc/avrc_sdp.o
CC bluedroid/stack/avdt/avdt_l2c.o
CC bluedroid/stack/avdt/avdt_api.o
CC bluedroid/stack/avdt/avdt_scb.o
CC bluedroid/stack/avdt/avdt_ccb_act.o
CC bluedroid/stack/avdt/avdt_ccb.o
CC bluedroid/stack/avdt/avdt_msg.o
CC bluedroid/stack/avdt/avdt_scb_act.o
CC bluedroid/stack/avdt/avdt_ad.o
CC bluedroid/stack/a2dp/a2d_sbc.o
CC bluedroid/stack/a2dp/a2d_api.o
CC bluedroid/utils/bt_utils.o
CC bluedroid/api/esp_avrc_api.o
CC bluedroid/api/esp_bt_main.o
CC bluedroid/api/esp_bt_device.o
CC bluedroid/api/esp_gap_bt_api.o
CC bluedroid/api/esp_a2dp_api.o
CC bluedroid/api/esp_gattc_api.o
CC bluedroid/api/esp_blufi_api.o
CC bluedroid/api/esp_gap_ble_api.o
CC bluedroid/api/esp_gatts_api.o
AR libbt.a
CC libcoap/src/address.o
CC libcoap/src/async.o
CC libcoap/src/block.o
CC libcoap/src/coap_time.o
CC libcoap/src/debug.o
CC libcoap/src/encode.o
CC libcoap/src/hashkey.o
CC libcoap/src/mem.o
CC libcoap/src/net.o
CC libcoap/src/option.o
CC libcoap/src/pdu.o
CC libcoap/src/resource.o
CC libcoap/src/str.o
CC libcoap/src/subscribe.o
CC libcoap/src/uri.o
CC port/coap_io_socket.o
AR libcoap.a
CXX cxx_guards.o
AR libcxx.a
CC spi_master.o
CC sigmadelta.o
CC uart.o
CC i2c.o
CC periph_ctrl.o
CC ledc.o
CC spi_common.o
CC gpio.o
CC pcnt.o
CC timer.o
CC rmt.o
CC mcpwm.o
CC sdmmc_transaction.o
CC spi_slave.o
CC sdmmc_host.o
CC i2s.o
CC rtc_module.o
AR libdriver.a
CC panic.o
CC core_dump.o
CC lib_printf.o
CC task_wdt.o
CC cpu_start.o
CC restore.o
CC crosscore_int.o
CC phy_init.o
CC deep_sleep.o
CC clk.o
CC freertos_hooks.o
CC gdbstub.o
CC cache_err_int.o
CC ipc.o
CC intr_alloc.o
CC heap_alloc_caps.o
CC int_wdt.o
CC event_loop.o
CC hw_random.o
CC dport_access.o
CC system_api.o
CC event_default_handlers.o
CC hwcrypto/sha.o
CC hwcrypto/aes.o
AR libesp32.a
CC emac_dev.o
CC emac_main.o
CC eth_phy/phy_common.o
CC eth_phy/phy_lan8720.o
CC eth_phy/phy_tlk110.o
AR libethernet.a
CC library/xmltok_ns.o
CC library/xmlparse.o
CC library/xmltok.o
CC library/xmlrole.o
CC library/xmltok_impl.o
CC port/minicheck.o
CC port/expat_element.o
CC port/chardata.o
AR libexpat.a
CC src/option/syscall.o
CC src/option/unicode.o
CC src/ff.o
CC src/vfs_fat_sdmmc.o
CC src/diskio_sdmmc.o
CC src/vfs_fat_spiflash.o
CC src/diskio_spiflash.o
CC src/vfs_fat.o
CC src/diskio.o
AR libfatfs.a
CC ringbuf.o
CC heap_regions_debug.o
CC xtensa_intr.o
CC queue.o
CC croutine.o
CC list.o
CC xtensa_init.o
CC port.o
CC heap_regions.o
CC event_groups.o
CC tasks.o
CC timers.o
CC FreeRTOS-openocd.o
CC xtensa_overlay_os_hook.o
AS xtensa_intr_asm.o
AS xtensa_context.o
AS xtensa_vectors.o
AS portasm.o
AR libfreertos.a
CC src//jsmn.o
AR libjsmn.a
CC library/cJSON.o
CC port/cJSON_Utils.o
AR libjson.a
CC private/randombytes_esp32.o
CC libsodium/src/libsodium/crypto_aead/chacha20poly1305/sodium/aead_chacha20poly1305.o
CC libsodium/src/libsodium/crypto_aead/xchacha20poly1305/sodium/aead_xchacha20poly1305.o
CC libsodium/src/libsodium/crypto_auth/crypto_auth.o
CC libsodium/src/libsodium/crypto_auth/hmacsha256/auth_hmacsha256.o
CC libsodium/src/libsodium/crypto_auth/hmacsha512/auth_hmacsha512.o
CC libsodium/src/libsodium/crypto_auth/hmacsha512256/auth_hmacsha512256.o
CC libsodium/src/libsodium/crypto_box/crypto_box_seal.o
CC libsodium/src/libsodium/crypto_box/crypto_box.o
CC libsodium/src/libsodium/crypto_box/crypto_box_easy.o
CC libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/box_curve25519xsalsa20poly1305.o
CC libsodium/src/libsodium/crypto_core/curve25519/ref10/curve25519_ref10.o
CC libsodium/src/libsodium/crypto_core/hchacha20/core_hchacha20.o
CC libsodium/src/libsodium/crypto_core/hsalsa20/ref2/core_hsalsa20_ref2.o
CC libsodium/src/libsodium/crypto_core/hsalsa20/core_hsalsa20.o
CC libsodium/src/libsodium/crypto_core/salsa/ref/core_salsa_ref.o
CC libsodium/src/libsodium/crypto_generichash/crypto_generichash.o
CC libsodium/src/libsodium/crypto_generichash/blake2b/generichash_blake2.o
CC libsodium/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-avx2.o
CC libsodium/src/libsodium/crypto_generichash/blake2b/ref/generichash_blake2b.o
CC libsodium/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-ref.o
CC libsodium/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-ssse3.o
CC libsodium/src/libsodium/crypto_generichash/blake2b/ref/blake2b-ref.o
CC libsodium/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-sse41.o
CC libsodium/src/libsodium/crypto_hash/crypto_hash.o
CC libsodium/src/libsodium/crypto_hash/sha256/hash_sha256.o
CC libsodium/src/libsodium/crypto_hash/sha256/cp/hash_sha256_cp.o
CC libsodium/src/libsodium/crypto_hash/sha512/hash_sha512.o
CC libsodium/src/libsodium/crypto_hash/sha512/cp/hash_sha512_cp.o
CC libsodium/src/libsodium/crypto_kdf/blake2b/kdf_blake2b.o
CC libsodium/src/libsodium/crypto_kdf/crypto_kdf.o
CC libsodium/src/libsodium/crypto_kx/crypto_kx.o
CC libsodium/src/libsodium/crypto_onetimeauth/crypto_onetimeauth.o
CC libsodium/src/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305.o
CC libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna.o
CC libsodium/src/libsodium/crypto_pwhash/argon2/argon2-core.o
CC libsodium/src/libsodium/crypto_pwhash/argon2/blake2b-long.o
CC libsodium/src/libsodium/crypto_pwhash/argon2/argon2-fill-block-ref.o
CC libsodium/src/libsodium/crypto_pwhash/argon2/argon2-encoding.o
CC libsodium/src/libsodium/crypto_pwhash/argon2/pwhash_argon2i.o
CC libsodium/src/libsodium/crypto_pwhash/argon2/argon2-fill-block-ssse3.o
CC libsodium/src/libsodium/crypto_pwhash/argon2/argon2.o
CC libsodium/src/libsodium/crypto_pwhash/crypto_pwhash.o
CC libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/scrypt_platform.o
CC libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/pwhash_scryptsalsa208sha256.o
CC libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/crypto_scrypt-common.o
CC libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/pbkdf2-sha256.o
CC libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/nosse/pwhash_scryptsalsa208sha256_nosse.o
CC libsodium/src/libsodium/crypto_scalarmult/crypto_scalarmult.o
CC libsodium/src/libsodium/crypto_scalarmult/curve25519/scalarmult_curve25519.o
CC libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/x25519_ref10.o
CC libsodium/src/libsodium/crypto_secretbox/crypto_secretbox_easy.o
CC libsodium/src/libsodium/crypto_secretbox/crypto_secretbox.o
CC libsodium/src/libsodium/crypto_secretbox/xsalsa20poly1305/secretbox_xsalsa20poly1305.o
CC libsodium/src/libsodium/crypto_shorthash/crypto_shorthash.o
CC libsodium/src/libsodium/crypto_shorthash/siphash24/shorthash_siphashx24.o
CC libsodium/src/libsodium/crypto_shorthash/siphash24/shorthash_siphash24.o
CC libsodium/src/libsodium/crypto_shorthash/siphash24/ref/shorthash_siphash24_ref.o
CC libsodium/src/libsodium/crypto_shorthash/siphash24/ref/shorthash_siphashx24_ref.o
CC libsodium/src/libsodium/crypto_sign/crypto_sign.o
CC libsodium/src/libsodium/crypto_sign/ed25519/sign_ed25519.o
CC libsodium/src/libsodium/crypto_sign/ed25519/ref10/obsolete.o
CC libsodium/src/libsodium/crypto_sign/ed25519/ref10/sign.o
CC libsodium/src/libsodium/crypto_sign/ed25519/ref10/open.o
CC libsodium/src/libsodium/crypto_sign/ed25519/ref10/keypair.o
CC libsodium/src/libsodium/crypto_stream/chacha20/stream_chacha20.o
CC libsodium/src/libsodium/crypto_stream/chacha20/ref/chacha20_ref.o
CC libsodium/src/libsodium/crypto_stream/crypto_stream.o
CC libsodium/src/libsodium/crypto_stream/salsa20/stream_salsa20.o
CC libsodium/src/libsodium/crypto_stream/salsa20/ref/salsa20_ref.o
CC libsodium/src/libsodium/crypto_stream/xsalsa20/stream_xsalsa20.o
CC libsodium/src/libsodium/crypto_verify/sodium/verify.o
CC libsodium/src/libsodium/randombytes/randombytes.o
CC libsodium/src/libsodium/sodium/core.o
CC libsodium/src/libsodium/sodium/version.o
CC libsodium/src/libsodium/sodium/runtime.o
CC libsodium/src/libsodium/sodium/utils.o
AR liblibsodium.a
CC log.o
AR liblog.a
CC api/pppapi.o
CC api/netdb.o
CC api/api_lib.o
CC api/netifapi.o
CC api/tcpip.o
CC api/netbuf.o
CC api/err.o
CC api/api_msg.o
CC api/sockets.o
CC apps/dhcpserver.o
CC apps/sntp/sntp.o
CC apps/ping/ping.o
CC apps/ping/esp_ping.o
CC core/mem.o
CC core/inet_chksum.o
CC core/init.o
CC core/memp.o
CC core/sys.o
CC core/tcp_in.o
CC core/dns.o
CC core/ip.o
CC core/raw.o
CC core/tcp.o
CC core/pbuf.o
CC core/netif.o
CC core/stats.o
CC core/timers.o
CC core/def.o
CC core/udp.o
CC core/tcp_out.o
CC core/ipv4/ip_frag.o
CC core/ipv4/dhcp.o
CC core/ipv4/ip4_addr.o
CC core/ipv4/igmp.o
CC core/ipv4/ip4.o
CC core/ipv4/autoip.o
CC core/ipv4/icmp.o
CC core/ipv6/ip6_frag.o
CC core/ipv6/dhcp6.o
CC core/ipv6/inet6.o
CC core/ipv6/ip6_addr.o
CC core/ipv6/ip6.o
CC core/ipv6/nd6.o
CC core/ipv6/mld6.o
CC core/ipv6/ethip6.o
CC core/ipv6/icmp6.o
CC netif/slipif.o
CC netif/etharp.o
CC netif/ethernet.o
CC netif/lowpan6.o
CC netif/ethernetif.o
CC port/freertos/sys_arch.o
CC port/netif/wlanif.o
CC port/netif/ethernetif.o
CC port/debug/lwip_debug.o
AR liblwip.a
CC library/x509write_crt.o
CC library/pk_wrap.o
CC library/ecp_curves.o
CC library/sha512.o
CC library/pkcs12.o
CC library/ccm.o
CC library/md.o
CC library/sha1.o
CC library/x509_csr.o
CC library/ssl_cli.o
CC library/camellia.o
CC library/blowfish.o
CC library/x509.o
CC library/ssl_ticket.o
CC library/error.o
CC library/dhm.o
CC library/entropy_poll.o
CC library/cipher.o
CC library/version_features.o
CC library/ripemd160.o
CC library/rsa.o
CC library/net.o
CC library/entropy.o
CC library/md_wrap.o
CC library/pkwrite.o
CC library/ecp.o
CC library/asn1parse.o
CC library/padlock.o
CC library/ssl_ciphersuites.o
CC library/pem.o
CC library/version.o
CC library/ssl_cache.o
CC library/memory_buffer_alloc.o
CC library/md2.o
CC library/ecdsa.o
CC library/ssl_srv.o
CC library/x509_crt.o
CC library/ecdh.o
CC library/asn1write.o
CC library/md4.o
CC library/sha256.o
CC library/x509_create.o
CC library/ecjpake.o
CC library/oid.o
CC library/pkcs5.o
CC library/pkcs11.o
CC library/base64.o
CC library/xtea.o
CC library/ctr_drbg.o
CC library/cipher_wrap.o
CC library/arc4.o
CC library/bignum.o
CC library/pkparse.o
CC library/ssl_tls.o
CC library/debug.o
CC library/threading.o
CC library/x509_crl.o
CC library/gcm.o
CC library/havege.o
CC library/timing.o
CC library/certs.o
CC library/md5.o
CC library/ssl_cookie.o
CC library/aesni.o
CC library/hmac_drbg.o
CC library/des.o
CC library/x509write_csr.o
CC library/pk.o
CC library/platform.o
CC library/aes.o
CC port/mbedtls_debug.o
CC port/esp_sha1.o
CC port/net.o
CC port/esp_sha256.o
CC port/esp_bignum.o
CC port/esp_hardware.o
CC port/esp_sha512.o
AR libmbedtls.a
CC mdns.o
AR libmdns.a
CC micro-ecc/uECC.o
AR libmicro-ecc.a
CC time.o
CC reent_init.o
CC syscalls.o
CC syscall_table.o
CC locks.o
AR libnewlib.a
CC nghttp2/lib/nghttp2_http.o
CC nghttp2/lib/nghttp2_version.o
CC nghttp2/lib/nghttp2_mem.o
CC nghttp2/lib/nghttp2_hd_huffman.o
CC nghttp2/lib/nghttp2_session.o
CC nghttp2/lib/nghttp2_callbacks.o
CC nghttp2/lib/nghttp2_outbound_item.o
CC nghttp2/lib/nghttp2_stream.o
CC nghttp2/lib/nghttp2_hd.o
CC nghttp2/lib/nghttp2_priority_spec.o
CC nghttp2/lib/nghttp2_buf.o
CC nghttp2/lib/nghttp2_option.o
CC nghttp2/lib/nghttp2_npn.o
CC nghttp2/lib/nghttp2_rcbuf.o
CC nghttp2/lib/nghttp2_helper.o
CC nghttp2/lib/nghttp2_frame.o
CC nghttp2/lib/nghttp2_hd_huffman_data.o
CC nghttp2/lib/nghttp2_debug.o
CC nghttp2/lib/nghttp2_submit.o
CC nghttp2/lib/nghttp2_pq.o
CC nghttp2/lib/nghttp2_queue.o
CC nghttp2/lib/nghttp2_map.o
AR libnghttp.a
CXX src/nvs_types.o
CXX src/nvs_page.o
CXX src/nvs_item_hash_list.o
CXX src/nvs_pagemanager.o
CXX src/nvs_storage.o
CXX src/nvs_api.o
AR libnvs_flash.a
CC library/ssl_cert.o
CC library/ssl_methods.o
CC library/ssl_pkey.o
CC library/ssl_x509.o
CC library/ssl_lib.o
CC library/ssl_stack.o
CC platform/ssl_pm.o
CC platform/ssl_port.o
AR libopenssl.a
CC sdmmc_cmd.o
AR libsdmmc.a
CC esp32/rtc_pm.o
CC esp32/cpu_util.o
CC esp32/brownout.o
CC esp32/rtc_time.o
CC esp32/rtc_init.o
CC esp32/rtc_sleep.o
CC esp32/rtc_clk.o
AR libsoc.a
CC flash_mmap.o
CC partition.o
CC spi_flash_rom_patch.o
CC cache_utils.o
CC flash_ops.o
AR libspi_flash.a
CC tcpip_adapter_lwip.o
AR libtcpip_adapter.a
CC ulp.o
CC ulp_macro.o
AR libulp.a
CC vfs_uart.o
CC vfs.o
AR libvfs.a
CXX wear_levelling.o
CXX WL_Flash.o
CXX crc32.o
CXX SPI_Flash.o
CXX Partition.o
AR libwear_levelling.a
CC src/crypto/aes-internal-enc.o
CC src/crypto/sha256-internal.o
CC src/crypto/md5-internal.o
CC src/crypto/aes-internal.o
CC src/crypto/sha1.o
CC src/crypto/aes-internal-dec.o
CC src/crypto/aes-unwrap.o
CC src/crypto/crypto_internal-rsa.o
CC src/crypto/des-internal.o
CC src/crypto/dh_group5.o
CC src/crypto/ms_funcs.o
CC src/crypto/aes-wrap.o
CC src/crypto/sha1-internal.o
CC src/crypto/md4-internal.o
CC src/crypto/dh_groups.o
CC src/crypto/crypto_internal.o
CC src/crypto/sha256.o
CC src/crypto/rc4.o
CC src/crypto/md5.o
CC src/crypto/aes-cbc.o
CC src/crypto/sha1-pbkdf2.o
CC src/crypto/bignum.o
CC src/crypto/crypto_internal-modexp.o
CC src/crypto/crypto_internal-cipher.o
CC port/os_xtensa.o
AR libwpa_supplicant.a
CC eri.o
CC trax.o
AR libxtensa-debug-module.a
CC main.o
AR libmain.a
LD app-template.elf
esptool.py v2.0.1
To flash all build output, run 'make flash' or:
python /home/andreas/esp32/esp-idf/components/esptool_py/esptool/esptool.py --chip esp32 --port /dev/ttyUSB0 --baud 115200 --before default_reset --after hard_reset write_flash -u --flash_mode dio --flash_freq 40m --flash_size detect 0x1000 /home/andreas/esp32/apps/myapp/build/bootloader/bootloader.bin 0x10000 /home/andreas/esp32/apps/myapp/build/app-template.bin 0x8000 /home/andreas/esp32/apps/myapp/build/partitions_singleapp.bin

GNU ld

$ ./xtensa-esp32-elf-gcc a.c -Wl,-verbose
GNU ld (crosstool-NG crosstool-ng-1.22.0-61-gab8375a) 2.25.1
  Supported emulations:
   elf32xtensa
using internal linker script:
==================================================
/* Script for -z combreloc: combine and sort reloc sections */
/* Copyright (C) 2014 Free Software Foundation, Inc.
   Copying and distribution of this script, with or without modification,
   are permitted in any medium without royalty provided the copyright
   notice and this notice are preserved.  */
ENTRY(_start)
SEARCH_DIR("=/home/ivan/e/crosstool-NG/builds/xtensa-esp32-elf/xtensa-esp32-elf/lib"); SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib"); SEARCH_DIR("=/usr/lib");
SECTIONS
{
  /* Read-only sections, merged into text segment: */
  PROVIDE (__executable_start = 0x400000); . = 0x400000 + SIZEOF_HEADERS;
  .interp         : { *(.interp) }
  .note.gnu.build-id : { *(.note.gnu.build-id) }
  .hash           : { *(.hash) }
  .gnu.hash       : { *(.gnu.hash) }
  .dynsym         : { *(.dynsym) }
  .dynstr         : { *(.dynstr) }
  .gnu.version    : { *(.gnu.version) }
  .gnu.version_d  : { *(.gnu.version_d) }
  .gnu.version_r  : { *(.gnu.version_r) }
  .rela.dyn       :
    {
      *(.rela.init)
      *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*)
      *(.rela.fini)
      *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*)
      *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*)
      *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*)
      *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*)
      *(.rela.ctors)
      *(.rela.dtors)
      *(.rela.got)
      *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)
    }
  .rela.plt       : { *(.rela.plt) }
  /* .plt* sections are embedded in .text */
  .text           :
  {
    *(.got.plt* .plt*)
    KEEP (*(.init.literal))
    KEEP (*(SORT_NONE(.init)))
    *(.literal .text .stub .literal.* .text.* .gnu.linkonce.literal.* .gnu.linkonce.t.*.literal .gnu.linkonce.t.*)
    /* .gnu.warning sections are handled specially by elf32.em.  */
    *(.gnu.warning)
    KEEP (*(.fini.literal))
    KEEP (*(SORT_NONE(.fini)))
  } =0
  PROVIDE (__etext = .);
  PROVIDE (_etext = .);
  PROVIDE (etext = .);
  .rodata         : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
  .rodata1        : { *(.rodata1) }
  .got.loc        : { *(.got.loc) }
  .xt_except_table   : ONLY_IF_RO { KEEP (*(.xt_except_table .xt_except_table.* .gnu.linkonce.e.*)) }
  .eh_frame_hdr : { *(.eh_frame_hdr) }
  .eh_frame       : ONLY_IF_RO { KEEP (*(.eh_frame)) }
  .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) }
  /* Adjust the address for the data segment.  We want to adjust up to
     the same address within the page on the next page up.  */
  . = ALIGN(CONSTANT (MAXPAGESIZE)) + (. & (CONSTANT (MAXPAGESIZE) - 1));
  /* Exception handling  */
  .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
  .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
  /* Thread Local Storage sections  */
  .tdata	  : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
  .tbss		  : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
  .preinit_array     :
  {
    PROVIDE_HIDDEN (__preinit_array_start = .);
    KEEP (*(.preinit_array))
    PROVIDE_HIDDEN (__preinit_array_end = .);
  }
  .init_array     :
  {
     PROVIDE_HIDDEN (__init_array_start = .);
     KEEP (*(SORT(.init_array.*)))
     KEEP (*(.init_array))
     PROVIDE_HIDDEN (__init_array_end = .);
  }
  .fini_array     :
  {
    PROVIDE_HIDDEN (__fini_array_start = .);
    KEEP (*(SORT(.fini_array.*)))
    KEEP (*(.fini_array))
    PROVIDE_HIDDEN (__fini_array_end = .);
  }
  .ctors          :
  {
    /* gcc uses crtbegin.o to find the start of
       the constructors, so we make sure it is
       first.  Because this is a wildcard, it
       doesn't matter if the user does not
       actually link against crtbegin.o; the
       linker won't look for a file to match a
       wildcard.  The wildcard also means that it
       doesn't matter which directory crtbegin.o
       is in.  */
    KEEP (*crtbegin.o(.ctors))
    KEEP (*crtbegin?.o(.ctors))
    /* We don't want to include the .ctor section from
       the crtend.o file until after the sorted ctors.
       The .ctor section from the crtend file contains the
       end of ctors marker and it must be last */
    KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors))
    KEEP (*(SORT(.ctors.*)))
    KEEP (*(.ctors))
  }
  .dtors          :
  {
    KEEP (*crtbegin.o(.dtors))
    KEEP (*crtbegin?.o(.dtors))
    KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors))
    KEEP (*(SORT(.dtors.*)))
    KEEP (*(.dtors))
  }
  .jcr            : { KEEP (*(.jcr)) }
  .data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro .data.rel.ro.* .gnu.linkonce.d.rel.ro.*) }
  .xt_except_table   : ONLY_IF_RW { KEEP (*(.xt_except_table .xt_except_table.* .gnu.linkonce.e.*)) }
  .dynamic        : { *(.dynamic) }
  .got            : { *(.got) }
  .data           :
  {
    *(.data .data.* .gnu.linkonce.d.*)
    SORT(CONSTRUCTORS)
  }
  .data1          : { *(.data1) }
  .xt_except_desc   :
  {
    *(.xt_except_desc .xt_except_desc.* .gnu.linkonce.h.*)
    *(.xt_except_desc_end)
  }
  .lit4           :
  {
    PROVIDE (_lit4_start = .);
    *(.lit4 .lit4.* .gnu.linkonce.lit4.*)
    PROVIDE (_lit4_end = .);
  }
  _edata = .; PROVIDE (edata = .);
  __bss_start = .;
  .bss            :
  {
   *(.dynbss)
   *(.bss .bss.* .gnu.linkonce.b.*)
   *(COMMON)
   /* Align here to ensure that the .bss section occupies space up to
      _end.  Align after .bss to ensure correct alignment even if the
      .bss section disappears because there are no input sections.
      FIXME: Why do we need it? When there is no .bss section, we don't
      pad the .data section.  */
   . = ALIGN(. != 0 ? 32 / 8 : 1);
  }
  . = ALIGN(32 / 8);
  . = ALIGN(32 / 8);
  _end = .; PROVIDE (end = .);
  /* Stabs debugging sections.  */
  .stab          0 : { *(.stab) }
  .stabstr       0 : { *(.stabstr) }
  .stab.excl     0 : { *(.stab.excl) }
  .stab.exclstr  0 : { *(.stab.exclstr) }
  .stab.index    0 : { *(.stab.index) }
  .stab.indexstr 0 : { *(.stab.indexstr) }
  .comment       0 : { *(.comment) }
  /* DWARF debug sections.
     Symbols in the DWARF debugging sections are relative to the beginning
     of the section so we begin them at 0.  */
  /* DWARF 1 */
  .debug          0 : { *(.debug) }
  .line           0 : { *(.line) }
  /* GNU DWARF 1 extensions */
  .debug_srcinfo  0 : { *(.debug_srcinfo) }
  .debug_sfnames  0 : { *(.debug_sfnames) }
  /* DWARF 1.1 and DWARF 2 */
  .debug_aranges  0 : { *(.debug_aranges) }
  .debug_pubnames 0 : { *(.debug_pubnames) }
  /* DWARF 2 */
  .debug_info     0 : { *(.debug_info .gnu.linkonce.wi.*) }
  .debug_abbrev   0 : { *(.debug_abbrev) }
  .debug_line     0 : { *(.debug_line .debug_line.* .debug_line_end ) }
  .debug_frame    0 : { *(.debug_frame) }
  .debug_str      0 : { *(.debug_str) }
  .debug_loc      0 : { *(.debug_loc) }
  .debug_macinfo  0 : { *(.debug_macinfo) }
  /* SGI/MIPS DWARF 2 extensions */
  .debug_weaknames 0 : { *(.debug_weaknames) }
  .debug_funcnames 0 : { *(.debug_funcnames) }
  .debug_typenames 0 : { *(.debug_typenames) }
  .debug_varnames  0 : { *(.debug_varnames) }
  /* DWARF 3 */
  .debug_pubtypes 0 : { *(.debug_pubtypes) }
  .debug_ranges   0 : { *(.debug_ranges) }
  /* DWARF Extension.  */
  .debug_macro    0 : { *(.debug_macro) }
  .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }
  .xt.lit       0 : { KEEP (*(.xt.lit .xt.lit.* .gnu.linkonce.p.*)) }
  .xt.insn      0 : { KEEP (*(.xt.insn .gnu.linkonce.x.*)) }
  .xt.prop      0 : { KEEP (*(.xt.prop .xt.prop.* .gnu.linkonce.prop.*)) }
  /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink)  *(.gnu.lto_*) }
}

Noduino

noduino.org
Jacks Lab: Noduino Quantum
Jacks Lab: ESP32 ADC

Grundlagen der Regelungstechnik (GRT)

Übertragungsglieder der Regelungstechnik
Zusammengesetzte Übertragungsglieder
Stabilitaet von Regelsystemen
Einführung in die Systemtheorie/ Druckversion

Wie Regelungstechnik die Welt erklären kann (Science Slam Finale 2011)

ibKastl GmbH

Regelungstechnik
PI-Glied

Wikipedia

Regelungstechnik
Regelstrecke
Regelkreis

Übertragungsfunktion
PT1-Glied
Sprungantwort

Thomas Mertin

Regelungstechnik
Regelungstechni k – Verhalten von Regelkreisgliedern

StudyHelpTV

Playlist

Mechatronik
Regelungstechnik

Blockschaltbild – elektrisches System (1)
Blockschaltbild – elektrisches System (2)
Blockschaltbilder vereinfachen (1)
Blockschaltbilder vereinfachen (2)
Blockschaltbilder vereinfachen – Summationsstellen verschieben (1)
Blockschaltbilder vereinfachen – Summationsstellen verschieben (2)

Ortskurve Einstieg – PT1 Glied – Regelungstechnik

Standard Übertragungsglied – PT1 Glied
Standard Übertragungsglied – PT2 Glied

Stabilität

Stabilität von Übertragungsgliedern
Stabilitätsreserve (1)
Stabilitätsreserve (2)

Nyquist Kriterium

Allgemeines Nyquist Kriterium
Das spezielle Nyquist-Kriterium
Nyquist Kriterium im Bode Diagramm

Totzeitglied

Totzeitglied – Regelungstechnik
Stabilität von Regelkreisen mit Totzeitgliedern

Regler

Anforderungen an Regler
Arten von Reglern – Übersicht
Störgrößenaufschaltung – Einstieg
Regler auslegen – Beispiel

Bode <=> Übertragungsfunktion

Bode Diagramme aus mehreren Standardgliedern erstellen
Bode Diagramm aus mehreren Standardgliedern
Übertragungsfunktion aus Bode-Diagramm

Elektrotechnik in 5 Minuten by Alexander Stöger

PT1 – Glied – Übertragungsglieder – Regelungstechnik
Wendetangentenverfahren Reglerentwurf Teil 1 Regelungstechnik
Wendetangentenverfahren Reglerentwurf P – Regler Teil 2 Regelungstechnik
4 Übertragungsfunktion berechnen Blockschaltbild

hawa0643

Regelungstechnik – Tutorial 01: Grundlagen, Grundbegriffe
Regelungstechnik – Tutorial 02: Zeitverhalten von Regelkreisgliedern
Regelungstechnik – Tutorial 03: Regelstrecken
Regelungstechnik – Tutorial 04: Regler
Regelungstechnik – Tutorial 05: Regelkreis

Stephan Mueller

Steuerung und Regelung, kleine Einführung
PID Regler mit Excel verständlich gemacht

Arduino DUE

Arduino Due
Hacking with the Arduino Due

Programming: ATMEGA16U2<

Upgrading the firmware of the Arduino Due Programming port 16U2

Upload

Ich hatte vor etwas längerem (April) in das Forum hier geschrieben, weil mein Arduino Due (SDuino) nicht flashen wollte und immer wieder der Fehler “No device found on COM3” kam.

Den Fehler habe ich nun behoben und es lässt sich einwandfrei flashen.

Gelöst wurde der Fehler, indem ich an den Widerstand R23 (bin mir nicht ganz sicher, aber ich denke das war der. muss später nochmal nachsehen.), welches 10k Ohm hat, einen 1k Ohm Widerstand Parallel angelötet habe. Dies ergibt einen Gesamtwiderstand von ca. 900 Ohm.

Ich habe einen Tip gelesen, dass der Widerstand mit 10k Ohm falsch dimensioniert ist und 1k Ohm eher passen. Der Widerstand ist aber so klein, dass ich einfach einen 1k Ohm parallel gelötet habe, sodass es ca. 1k Ohm hat (900Ohm)

Auch der Fehler, dass mein Native USB Port nicht erkannt wurde, ist nach dem Einbau des Widerstands nicht mehr vorhanden.

Sollte jemand in Zukunft mal ähnliche Fehler haben, dann weiß er ja bescheid

Fehler beim flashen – Arduino Due
Errors in Due board/schematic files
Due appears as COM6 port but gives error “No device found on COM6” on upload

$ lsusb
Bus 002 Device 006: ID 2341:003d Arduino SA 
Bus 002 Device 004: ID 046d:c063 Logitech, Inc. DELL Laser Mouse
Bus 002 Device 003: ID 413c:2005 Dell Computer Corp. RT7D50 Keyboard
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

$ stty -F /dev/ttyACM1 speed 1200 cs8 -cstopb -parenb
115200

$ stty -F /dev/ttyACM1 speed 1200 cs8 -cstopb -parenb
1200

$ setserial -G /dev/ttyACM1
/dev/ttyACM1 uart unknown port 0x0000 irq 0 baud_base 115200 spd_normal low_latency

$ echo -n ^R^B > /dev/ttyACM1

SAMD21: Arduino Zero / Feather M0

Shop / Projects

Minifigure SAM
Sam DEV
HACK-HackAday Cortex Kit
Developed on Hackaday : HaDge update – it’s a HACK
LEMSv2
MakerNet

Aliexpress

SAMD21 M0. 32-bit ARM Cortex M0 core. kompatibel mit Arduino Null, Arduino M0. Form R3.
SAMD21 M0-Mini. 32-bit ARM Cortex M0 core. Pins Abgelötet. kompatibel mit Arduino Null, Arduino M0. Form Mini.
Arduino Zero for dummies

Library

github.com/adafruit/Adafruit_ASFcore: ASF core files for Zero

Debugging

Proper Debugging of ATSAMD21 Processors

I2C

Adding more Serial Interfaces to SAMD microcontrollers (SERCOM) (VERX USEFUL!)
Wire lib hangs when scanning i2c in Wire.endTransmission()

Timer

AMD21 Timer library for the SAM15x15 and Arduino Zero
Arduino ZERO timer interrupts
happy wrappers for TC modules 3,4,5 on SAMD21
github.com/nebs/arduino-zero-timer-demo: A simple demo of the Arduino Zero timer frequency being smoothly changed in real time.
github.com/maxbader/arduino_tools: Arduino libraries and samples

Code

/c/Users/bachman0/AppData/Local/Arduino15
/c/Users/bachman0/Documents/Arduino/libraries/
C:\Users\bachman0\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.12\cores\arduino\main.cpp
/c/Users/bachman0/AppData/Local/Arduino15/packages/arduino/hardware/samd/1.6.12/cores/arduino/main.cpp

/*
 * \brief Main entry point of Arduino application
 */
int main( void )
{
  init();

  __libc_init_array();

  initVariant();

  delay(1);
#if defined(USBCON)
  USBDevice.init();
  USBDevice.attach();
#endif

  setup();

  for (;;)
  {
    loop();
    if (serialEventRun) serialEventRun();
  }

  return 0;
}
C:\Users\bachman0\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.12
cores\arduino\cortex_handlers.c

/* Exception Table */
__attribute__ ((section(".isr_vector"))) const DeviceVectors exception_table =
{
  /* Configure Initial Stack Pointer, using linker-generated symbols */
  (void*) (&__StackTop),

  (void*) Reset_Handler,
  (void*) NMI_Handler,
  (void*) HardFault_Handler,
  (void*) (0UL), /* Reserved */
  (void*) (0UL), /* Reserved */
  (void*) (0UL), /* Reserved */
  (void*) (0UL), /* Reserved */
  (void*) (0UL), /* Reserved */
  (void*) (0UL), /* Reserved */
  (void*) (0UL), /* Reserved */
  (void*) SVC_Handler,
  (void*) (0UL), /* Reserved */
  (void*) (0UL), /* Reserved */
  (void*) PendSV_Handler,
  (void*) SysTick_Handler,

  /* Configurable interrupts */
  (void*) PM_Handler,             /*  0 Power Manager */
  (void*) SYSCTRL_Handler,        /*  1 System Control */
  (void*) WDT_Handler,            /*  2 Watchdog Timer */
  (void*) RTC_Handler,            /*  3 Real-Time Counter */
  (void*) EIC_Handler,            /*  4 External Interrupt Controller */
  (void*) NVMCTRL_Handler,        /*  5 Non-Volatile Memory Controller */
  (void*) DMAC_Handler,           /*  6 Direct Memory Access Controller */
  (void*) USB_Handler,            /*  7 Universal Serial Bus */
  (void*) EVSYS_Handler,          /*  8 Event System Interface */
  (void*) SERCOM0_Handler,        /*  9 Serial Communication Interface 0 */
  (void*) SERCOM1_Handler,        /* 10 Serial Communication Interface 1 */
  (void*) SERCOM2_Handler,        /* 11 Serial Communication Interface 2 */
  (void*) SERCOM3_Handler,        /* 12 Serial Communication Interface 3 */
  (void*) SERCOM4_Handler,        /* 13 Serial Communication Interface 4 */
  (void*) SERCOM5_Handler,        /* 14 Serial Communication Interface 5 */
  (void*) TCC0_Handler,           /* 15 Timer Counter Control 0 */
  (void*) TCC1_Handler,           /* 16 Timer Counter Control 1 */
  (void*) TCC2_Handler,           /* 17 Timer Counter Control 2 */
  (void*) TC3_Handler,            /* 18 Basic Timer Counter 0 */
  (void*) TC4_Handler,            /* 19 Basic Timer Counter 1 */
  (void*) TC5_Handler,            /* 20 Basic Timer Counter 2 */
  (void*) TC6_Handler,            /* 21 Basic Timer Counter 3 */
  (void*) TC7_Handler,            /* 22 Basic Timer Counter 4 */
  (void*) ADC_Handler,            /* 23 Analog Digital Converter */
  (void*) AC_Handler,             /* 24 Analog Comparators */
  (void*) DAC_Handler,            /* 25 Digital Analog Converter */
  (void*) PTC_Handler,            /* 26 Peripheral Touch Controller */
  (void*) I2S_Handler,            /* 27 Inter-IC Sound Interface */
  (void*) (0UL),                  /* Reserved */
};
digitalRead()
Arduino15/packages/arduino/hardware/samd/1.6.12/cores/arduino/wiring_digital.c:int digitalRead( uint32_t ulPin )
Arduino15/packages/arduino/hardware/samd/1.6.12/cores/arduino/wiring_digital.h:extern int digitalRead( uint32_t ulPin ) ;

millis()
Arduino15/packages/arduino/hardware/samd/1.6.12/cores/arduino/delay.c:uint32_t millis( void )
Arduino15/packages/arduino/hardware/samd/1.6.12/cores/arduino/delay.h:extern uint32_t millis( void ) ;

yield()
Arduino15/packages/arduino/hardware/samd/1.6.12/cores/arduino/Arduino.h:void yield( void ) ;
Arduino15/packages/arduino/hardware/samd/1.6.12/cores/arduino/hooks.c:void yield(void) __attribute__ ((weak, alias("__empty")));

dtostrf()
Arduino15/packages/arduino/hardware/samd/1.6.12/cores/arduino/avr/dtostrf.c:char *dtostrf (double val, signed char width, unsigned char prec, char *sout) {
Arduino15/packages/arduino/hardware/samd/1.6.12/cores/arduino/avr/dtostrf.h:char *dtostrf(double val, signed char width, unsigned char prec, char *sout);

String / StringObject
Arduino15/packages/arduino/hardware/samd/1.6.12/cores/arduino/WString.cpp:String::String(const char *cstr)
Arduino15/packages/arduino/hardware/samd/1.6.12/cores/arduino/WString.h:class String

Stream::readStringUntil()
Arduino15/packages/arduino/hardware/samd/1.6.12/cores/arduino/Stream.cpp:String Stream::readStringUntil(char terminator)
Arduino15/packages/arduino/hardware/samd/1.6.12/cores/arduino/Stream.h:  String readStringUntil(char terminator);
C:\Users\bachman0\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.6.12
cores\arduino\SERCOM.h

/c/Users/bachman0/AppData/Local/Arduino15/packages/arduino/hardware/samd/1.6.12/libraries/Wire

TwoWire::TwoWire(SERCOM * s, uint8_t pinSDA, uint8_t pinSCL)
{
  this->sercom = s;
  this->_uc_pinSDA=pinSDA;
  this->_uc_pinSCL=pinSCL;
  transmissionBegun = false;
}

void TwoWire::begin(void) {
  //Master Mode
  sercom->initMasterWIRE(TWI_CLOCK);
  sercom->enableWIRE();

  pinPeripheral(_uc_pinSDA, g_APinDescription[_uc_pinSDA].ulPinType);
  pinPeripheral(_uc_pinSCL, g_APinDescription[_uc_pinSCL].ulPinType);
}

void TwoWire::begin(uint8_t address) {
  //Slave mode
  sercom->initSlaveWIRE(address);
  sercom->enableWIRE();

  pinPeripheral(_uc_pinSDA, g_APinDescription[_uc_pinSDA].ulPinType);
  pinPeripheral(_uc_pinSCL, g_APinDescription[_uc_pinSCL].ulPinType);
}


void (*onReceiveCallback)(int);
void TwoWire::onService(void)
void SERCOM3_Handler(void); // Interrupt Handler

#if WIRE_INTERFACES_COUNT > 0
  /* In case new variant doesn't define these macros,
   * we put here the ones for Arduino Zero.
   *
   * These values should be different on some variants!
   */
  #ifndef PERIPH_WIRE
    #define PERIPH_WIRE          sercom3
    #define WIRE_IT_HANDLER      SERCOM3_Handler
  #endif // PERIPH_WIRE
  TwoWire Wire(&PERIPH_WIRE, PIN_WIRE_SDA, PIN_WIRE_SCL);

  void WIRE_IT_HANDLER(void) {
    Wire.onService();
  }
#endif
/c/Program\ Files\ \(x86\)/Arduino/libraries/SD

File
Arduino/libraries/SD/src/File.cpp:File::File(SdFile f, const char *n)
Arduino/libraries/SD/src/SD.h:class File : public Stream

File::openNextFile
Arduino/libraries/SD/src/SD.cpp:File File::openNextFile(uint8_t mode)

SdFile
Arduino/libraries/SD/src/utility/SdFat.h:class SdFile : public Print {
Arduino/libraries/SD/src/utility/SdFat.h:  uint8_t open(SdFile& dirFile, const char* fileName) {  // NOLINT
Arduino/libraries/SD/src/utility/SdFile.cpp:uint8_t SdFile::open(SdFile* dirFile, const char* fileName, uint8_t oflag) {

SdFile::openRoot
Arduino/libraries/SD/src/utility/SdFile.cpp:uint8_t SdFile::openRoot(SdVolume* vol) {
Arduino/libraries/SD/src/utility/SdFile.cpp:uint8_t SdFile::openRoot(SdVolume* vol, Stream* stream) {

/c/Users/bachman0/AppData/Local/Arduino15
packages/SparkFun/hardware/samd/1.3.2/variants/SparkFun_9DoF_M0/variant.cpp

[...]

// Multi-serial objects instantiation
SERCOM sercom0( SERCOM0 ) ;
SERCOM sercom1( SERCOM1 ) ;
SERCOM sercom2( SERCOM2 ) ;
SERCOM sercom3( SERCOM3 ) ;
SERCOM sercom4( SERCOM4 ) ;
SERCOM sercom5( SERCOM5 ) ;

Uart Serial1( &sercom0, PIN_SERIAL1_RX, PIN_SERIAL1_TX, PAD_SERIAL1_RX, PAD_SERIAL1_TX ) ;
Uart Serial( &sercom5, PIN_SERIAL_RX, PIN_SERIAL_TX, PAD_SERIAL_RX, PAD_SERIAL_TX ) ;

/**
 * SERCOM0_Handler is mapped to Serial1
 * How can I remap it to I2C??
 */
void SERCOM0_Handler()
{
  Serial1.IrqHandler();
}

void SERCOM5_Handler()
{
  Serial.IrqHandler();
}