### Download the CS43L22 audio example Source: https://forgge.github.io/theCore/singlehtml/contents.html Initialize the example repository and change into its directory. ```bash tcore init --remote https://github.com/theCore-embedded/example_cs43l22_audio cd example_cs43l22_audio ``` -------------------------------- ### Download the Hello World example Source: https://forgge.github.io/theCore/singlehtml/contents.html Initialize a new project from the remote example repository. ```bash tcore init --remote https://github.com/theCore-embedded/example_hello_world ``` -------------------------------- ### Download the example project Source: https://forgge.github.io/theCore/singlehtml/contents.html Command to initialize the example project from the remote repository. ```bash tcore init --remote https://github.com/theCore-embedded/example_fatfs ``` -------------------------------- ### Install and initialize theCore Source: https://forgge.github.io/theCore/singlehtml/contents.html Install theCore using pip and run bootstrap. Use 'pip install tcore' if python3-pip is default. ```bash pip3 install tcore # Or if python3-pip is default: pip install tcore tcore bootstrap ``` -------------------------------- ### Download the HTU21D example Source: https://forgge.github.io/theCore/singlehtml/contents.html Initialize theCore project from the remote example repository and change into the directory. ```bash tcore init --remote https://github.com/theCore-embedded/example_sensor_htu21d cd example_sensor_htu21d ``` -------------------------------- ### Download example_blinky Source: https://forgge.github.io/theCore/singlehtml/contents.html Initialize the example project from the remote repository. ```bash tcore init --remote https://github.com/theCore-embedded/example_blinky ``` -------------------------------- ### Step into the project directory Source: https://forgge.github.io/theCore/singlehtml/contents.html Change to the example project directory. ```bash cd example_hello_world ``` -------------------------------- ### Expected output from the example Source: https://forgge.github.io/theCore/singlehtml/contents.html Example console output showing the SD card root directory listing and prompt. ```text Welcome to theCore the_core v0.3.287 5045e04-dirty Starting FATFS example... #. 0 type: dir name : HOME #. 1 type: dir name : VAR #. 2 type: file name : TEST_FILE.TXT #. 3 type: file name : ANOTHER_FILE.TXT Which file to open? ``` -------------------------------- ### Build theCore test suites with CMake Source: https://forgge.github.io/theCore/singlehtml/contents.html Run these commands in a terminal to compile the test suites. Requires the Nix environment from the Getting started guide. The build directory will contain suite_list.txt with paths to the suite binaries. ```bash mkdir tests_build cd tests_build cmake ../tests make ``` -------------------------------- ### Install theCore and bootstrap Source: https://forgge.github.io/theCore/singlehtml/contents.html Install theCore using pip and run bootstrap. This may take a while. ```bash pip3 install tcore tcore bootstrap ``` -------------------------------- ### Download the HM-10 Bluetooth example Source: https://forgge.github.io/theCore/singlehtml/contents.html Use tcore init to download the example project from the remote repository. ```bash tcore init --remote https://github.com/theCore-embedded/example_hm10_bluetooth ``` -------------------------------- ### Change to project directory Source: https://forgge.github.io/theCore/singlehtml/contents.html Navigate into the downloaded example project directory. ```bash cd example_hm10_bluetooth ``` -------------------------------- ### Install curl on Ubuntu Source: https://forgge.github.io/theCore/singlehtml/contents.html Install curl using apt-get on Ubuntu. ```bash sudo apt-get install curl ``` -------------------------------- ### Step into the project directory Source: https://forgge.github.io/theCore/singlehtml/contents.html Command to change into the example project directory. ```bash cd example_fatfs ``` -------------------------------- ### Example connected_devices_example.json Source: https://forgge.github.io/theCore/singlehtml/contents.html JSON file describing connected boards for the flasher script. Must be filled manually according to the connected board. The example shows configurations for stm32f4discovery_simple and tivac_tm4 using OpenOCD with specific flash parameters and config files. ```json { "stm32f4discovery_simple": { "debugger": { "name": "openocd", "flash_params": "init; reset halt; wait_halt; flash write_image erase {elf_path}; reset run; shutdown", "conf_file" : "stm32f4discovery.cfg" } }, "tivac_tm4": { "debugger": { "name": "openocd", "flash_params": "init; reset halt; wait_halt; flash write_image erase {elf_path}; reset run; shutdown", "conf_file" : "ek-lm4f120xl.cfg" } } } ``` -------------------------------- ### Compile for STM32F4 Discovery Source: https://forgge.github.io/theCore/singlehtml/contents.html Build the example for the STM32F4 Discovery board. ```bash tcore compile --target stm32f4_disc ``` -------------------------------- ### Compile for host target Source: https://forgge.github.io/theCore/singlehtml/contents.html Compile the example for the host target. ```bash tcore compile --target host ``` -------------------------------- ### Compile for Tiva TM4C LaunchPad Source: https://forgge.github.io/theCore/singlehtml/contents.html Build the example for the Tiva TM4C LaunchPad board. ```bash tcore compile --target tiva_tm4c_launchpad ``` -------------------------------- ### Download the example_button_interrupt project Source: https://forgge.github.io/theCore/singlehtml/contents.html Use tcore init with the remote repository URL to download the example project. ```bash tcore init --remote https://github.com/theCore-embedded/example_button_interrupt ``` -------------------------------- ### Launch minicom with sudo Source: https://forgge.github.io/theCore/singlehtml/contents.html Alternative command to start minicom with superuser permissions. ```bash # From new terminal tcore runenv --sudo "minicom -D /dev/ttyACM0" ``` -------------------------------- ### Expected console output on startup Source: https://forgge.github.io/theCore/singlehtml/contents.html Console output shown when the device boots, indicating the EXTI button interrupt demo is starting. ```text Welcome to theCore the_core v0.3.0.307 9ff344b-dirty Starting EXTI (button interrupt) demo ``` -------------------------------- ### Template parameter naming example Source: https://forgge.github.io/theCore/singlehtml/contents.html Shows CamelCase style for template parameters. ```cpp template class my_strange_container; ``` -------------------------------- ### View suite_list.txt contents Source: https://forgge.github.io/theCore/singlehtml/contents.html Example output of the cat command showing the suite_list.txt file generated in the build directory. Each line lists suite name, board, and paths to the ELF and binary files. ```bash $ cat suite_list.txt platform_bat,tivac_tm4,/tmp/theCore/tests/build/tivac_tm4/platform_bat.gnu//build/platform_bat,/tmp/build3/tivac_tm4/platform_bat.gnu//build/platform_bat.bin platform_bat,stm32f4discovery_simple,/tmp/theCore/tests/build/stm32f4discovery_simple/platform_bat.gnu//build/platform_bat,/tmp/build3/stm32f4discovery_simple/platform_bat.gnu//build/platform_bat.bin platform_bat,stm32f4discovery_simple,/tmp/theCore/tests/build/stm32f4discovery_simple/platform_bat.clang//build/platform_bat,/tmp/build3/stm32f4discovery_simple/platform_bat.clang//build/platform_bat.bin unity_demo,stm32f4discovery_simple,/tmp/theCore/tests/build/stm32f4discovery_simple/unity_demo.gnu//build/unity_demo,/tmp/build3/stm32f4discovery_simple/unity_demo.gnu//build/unity_demo.bin unity_demo,tivac_tm4,/tmp/theCore/tests/build/tivac_tm4/unity_demo.gnu//build/unity_demo,/tmp/build3/tivac_tm4/unity_demo.gnu//build/unity_demo.bin ``` -------------------------------- ### Expected console output Source: https://forgge.github.io/theCore/singlehtml/contents.html Example output from the HTU21D sensor showing temperature and humidity readings. ```text Welcome to theCore the_core v0.3.0.321 90f4894-dirty Starting HTU21D sensor... Reset done Temperature: 25.362 Celsius Humidity: 45.162% Temperature: 25.362 Celsius Humidity: 45.170% Temperature: 25.362 Celsius Humidity: 45.155% Temperature: 25.362 Celsius Humidity: 45.147% Temperature: 25.351 Celsius Humidity: 45.155% ``` -------------------------------- ### Namespace bracket placement example Source: https://forgge.github.io/theCore/singlehtml/contents.html Shows correct bracket placement for namespaces, with the opening brace on the next line. ```cpp // Wrong namespace foo { } // OK namespace bar { } ``` -------------------------------- ### Restart udev on Ubuntu Source: https://forgge.github.io/theCore/singlehtml/contents.html Use this command on Ubuntu to trigger udev rules after installation. ```bash sudo udevadm trigger ``` -------------------------------- ### Expected console output Source: https://forgge.github.io/theCore/singlehtml/contents.html The expected output when running the Hello World example, showing theCore version, Hello World message, and delay demonstration. ```text Welcome to theCore the_core v0.3.0.307 9ff344b-dirty Hello World! Starting delay demonstration... [--] Waiting for 2 seconds [--] Done waiting 2 seconds [----] Waiting for 4 seconds [----] Done waiting 4 seconds [--------] Waiting for 8 seconds [--------] Done waiting 8 seconds ``` -------------------------------- ### Class and namespace indentation example Source: https://forgge.github.io/theCore/singlehtml/contents.html Shows correct indentation for class and namespace blocks, with public/private/protected at the same indent as the class. ```cpp // OK namespace foo { class entity { public: /* */ private: /* */ protected: /* */ }; } // namespace foo ``` -------------------------------- ### Doxygen comment example Source: https://forgge.github.io/theCore/singlehtml/contents.html Shows the preferred style for Doxygen comments using C++ comment lines. ```cpp //! This function does something. //! \details Also it calls 911. void foo(); ``` -------------------------------- ### Expected minicom output after flashing Source: https://forgge.github.io/theCore/singlehtml/contents.html The output shown in minicom after flashing and starting the example. It indicates the HM-10 Bluetooth example is running and sending data. ```text Welcome to theCore the_core v0.3.236 b9c05be-dirty Starting HM-10 Bluetooth example... Bytes sent: 16 Bytes received: 0 Bytes sent: 16 Bytes received: 0 Bytes sent: 16 Bytes received: 0 ``` -------------------------------- ### Redundant Doxygen comment example Source: https://forgge.github.io/theCore/singlehtml/contents.html Shows an example of a redundant Doxygen comment that should be avoided. ```cpp //! Set the size. //! \param size The size. void set_size(size_t size); ``` -------------------------------- ### Step into project directory Source: https://forgge.github.io/theCore/singlehtml/contents.html Change to the example_blinky directory. ```bash cd example_blinky ``` -------------------------------- ### Install tcore script with pip3 Source: https://forgge.github.io/theCore/singlehtml/contents.html Install the tcore script using pip3. Requires Python 3 and dependencies. ```bash sudo pip3 install tcore ``` -------------------------------- ### Step into the project directory Source: https://forgge.github.io/theCore/singlehtml/contents.html Change into the downloaded example_button_interrupt directory. ```bash cd example_button_interrupt ``` -------------------------------- ### Bootstrap theCore with root permissions Source: https://forgge.github.io/theCore/singlehtml/contents.html Run tcore bootstrap, which may ask for root permissions if /nix does not exist. ```bash tcore bootstrap ``` -------------------------------- ### Flash for TivaC launchpad Source: https://forgge.github.io/theCore/singlehtml/contents.html Flash the firmware to the TivaC launchpad using sudo. ```bash tcore flash --sudo ``` -------------------------------- ### Expected output from minicom Source: https://forgge.github.io/theCore/singlehtml/contents.html Expected serial output when the audio example runs. ```text Welcome to theCore Playing audio sample... ``` -------------------------------- ### Bootstrap theCore without root permissions Source: https://forgge.github.io/theCore/singlehtml/contents.html Create /nix directory and give ownership to the current user, then run tcore bootstrap without root permissions. ```bash sudo mkdir /nix sudo chown $(whoami) /nix tcore bootstrap ``` -------------------------------- ### TODO comment with issue number example Source: https://forgge.github.io/theCore/singlehtml/contents.html Shows how to include a TODO comment with an issue number and explanation. ```cpp // TODO #123: replace foo() with something that exposes smaller IRQ latency. foo(); ``` -------------------------------- ### Run on host target Source: https://forgge.github.io/theCore/singlehtml/contents.html Execute the compiled host binary. ```bash ./build/host/hello_world ``` -------------------------------- ### Template angle bracket spacing example Source: https://forgge.github.io/theCore/singlehtml/contents.html Shows correct spacing for template angle brackets, with no whitespace between them. ```cpp // Good foo> obj; // Bad foo > obj; ``` -------------------------------- ### Build Sphinx documentation with CMake and make core_sphinx Source: https://forgge.github.io/theCore/singlehtml/contents.html Run these commands from the theCore directory to build Sphinx documentation. Doxygen is built automatically before Sphinx. Generated docs are available at doc_build/sphinx/theCore/index.html and doc_build/sphinx/theCore/singlehtml/index.html. ```bash # From theCore directory mkdir doc_build cd doc_build cmake ../doc make core_sphinx ```