How do I flash the examples from the ameba sdk? Where should I put the src-file (for the example)? Do I need to rebuild only project_hp or also project_lp?
For peripheral examples found in
\project\realtek_amebaD_va0_example\example_sources, you should copy the example source files and replace those found in
For software examples found in
\component\common\example, they can be enabled by modifying the corresponding
\project\realtek_amebaD_va0_example\inc\inc_hp\platform_opts.h. Some examples will also require you to enter the
make menuconfig configuration menu to enable the feature first (e.g. BLE).
Most of the time you should only need to rebuild project_hp, unless you have code that specifically runs on the lp processor core.
Ok, thanks for your answer!
What is the difference between peripheral and software examples?
peripheral examples are examples that show how to use hardware peripherals on the chip, e.g. ADC, flash, GPIO, I2C, RTC, SDIO, SPI, timer, UART
software examples are examples that show how to use software libraries for communication / data processing, e.g. file system, HTTP, MQTT, OTA, SSL, TCP, WiFi
So lets say I flashed the soc with the “wlan_scenario”. Where am I able to communicate with the board? For example if I want to scan for wifi networks, where do I write the input and where can I view the output (the networks that are detected)?
The LOG_UART pins (PA7 & PA8) would be the default input / output for most logs, messages and examples.
By default, even without enabling any examples, the compiled image should have an AT command interface listening on the LOG_UART pins. You can refer to AN0025 for the command format and functions. You can use the commands to connect to WiFi and transmit TCP messages.
I got the AT-commands to work with pre-compiled binary files (downloaded from AM8722DM factory reset - #4 by wyy ) so there is some problem with my own binaries…
Maybe you could try the V1 release version instead of downloading from the master or dev branches.