-
-
Notifications
You must be signed in to change notification settings - Fork 591
Debug with serial
sommermorgentraum edited this page Apr 20, 2024
·
6 revisions
You can only print things to debug for this. If you wanna set break point etc, use another debug method.
- Include the async msg header in your file
#include "usb_serial_asyncmsg.hpp"
2 print things in your code and it will appear on serial.
void FileManBaseView::push_dir(const fs::path& path) {
std::string test_string = "test string:";
UsbSerialAsyncmsg::asyncmsg(test_string);
std::string test_string111 = "abcdefghi";
UsbSerialAsyncmsg::asyncmsg(test_string111);
std::string test_path_label = "test_path:";
UsbSerialAsyncmsg::asyncmsg(test_path_label);
UsbSerialAsyncmsg::asyncmsg(path);
std::string test_vec_label = "test_vector:";
UsbSerialAsyncmsg::asyncmsg(test_vec_label);
std::vector<uint32_t> test_vector;
test_vector.push_back(1);
test_vector.push_back(2);
test_vector.push_back(3);
UsbSerialAsyncmsg::asyncmsg(test_vector);
std::string test_num_label = "test_num:";
UsbSerialAsyncmsg::asyncmsg(test_num_label);
uint8_t test = 254;
UsbSerialAsyncmsg::asyncmsg(test);
if (path == parent_dir_path) {
pop_dir();
} else {
current_path /= path;
saved_index_stack.push_back(menu_view.highlighted_index());
menu_view.set_highlighted(0);
reload_current(true);
}
}
- make sure async msg lock is disabled.
asyncmsg enable
- make sure serial connected
help
- MayhemHub currently not support real-time serial command communication. Use others.
Note
The wiki is incomplete. Please add content and collaborate.
Important
- This is a public wiki. Everything is visible to everyone. Don't use it for personal notes.
- Avoid linking to external tutorials/articles; they may become outdated or contain false information.
How to collaborate
How to ask questions correctly
- First steps
- Usage cautions
- Intended use and Legality
- Features
- PortaPack Versions (which one to buy)
- HackRF Versions
- Firmware update procedure
- Description of the hardware
- User interface
- Powering the PortaPack
-
Troubleshooting
- Won't boot
- Config Menu
- Firmware upgrade
- Diagnose firmware update in Windows
- Receive Quality Issues
- No TX/RX
- TX Carrier Only
- H2+ speaker modifications
- Dead Coin Cell Battery
- Factory Defaults
- SD card not recognized by PC with the SD-card over USB selected
- DFU overlay
- Full reset
- SolveBoard
- How to Format SDCard
- Applications
-
Compilation of the firmware
- Compile on WSL with ninja
- How to compile on Windows faster with WSL 2
- Using Docker and Kitematic
- Docker command-line reference
- Using Buddyworks and other CI platforms
- Notes for Buddy.Works (and other CI platforms)
- Using ARM on Debian host
- All in one script for ARM on Debian host
- Compile on Arch based distro (exclude Asahi)
- Dev build versions
- Notes About ccache
- Create a custom map
- Code formatting
- PR process
- Description of the Structure
- Software Dev Guides
- Tools
- Research
- UI Screenshots
- Maintaining
- Creating a prod/stable release (Maintainers only)
- Maintaining rules
- Development States Notes