-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathESP_Development.alias
More file actions
executable file
·134 lines (118 loc) · 7.4 KB
/
ESP_Development.alias
File metadata and controls
executable file
·134 lines (118 loc) · 7.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
# ==============================================================================
# ESP Development - Enhanced Collection
# ==============================================================================
#
# Comprehensive ESP32/ESP8266 development aliases for embedded systems programming
# Includes environment setup, build commands, flashing, monitoring, configuration, and utilities
#
# Sections:
# - Environment Setup
# - Build Commands
# - Flash Commands
# - Monitoring
# - Configuration
# - Port Management
# - Project Management
# - ESP8266 RTOS SDK
# - Partition Management
# - OTA (Over-The-Air) Updates
# - Testing & Analysis
# - Common Component Management
# - Development Utilities
# - Quick Access to Common Directories
#
# ==============================================================================
# ==============================================================================
# ENVIRONMENT SETUP
# ==============================================================================
### Environment Setup
alias get_idf='. $HOME/esp/esp-idf/export.sh' # Load ESP-IDF environment
alias esp-latest='cd $HOME/esp/esp-idf && git pull && git submodule update --init --recursive' # Update ESP-IDF
alias esp-clean='rm -rf build/ sdkconfig sdkconfig.old' # Clean build files
# ==============================================================================
# BUILD COMMANDS
# ==============================================================================
alias esp-build='idf build' # Build project
alias esp-clean-build='esp-clean && esp-build' # Clean and build
alias esp-size='idf size' # Show binary size
alias esp-size-comp='idf size-components' # Show component sizes
alias esp-size-files='idf size-files' # Show file sizes
# ==============================================================================
# FLASH COMMANDS
# ==============================================================================
alias esp-flash='idf -p /dev/ttyUSB0 flash' # Flash to default port
alias esp-flash-mon='idf -p /dev/ttyUSB0 flash monitor' # Flash and monitor
alias esp-erase='idf -p /dev/ttyUSB0 erase_flash' # Erase flash memory
alias esp-boot0='esptool -p /dev/ttyUSB0 read_mac' # Read MAC address
# ==============================================================================
# MONITORING
# ==============================================================================
alias esp-mon='idf monitor' # Start serial monitor
alias esp-log='idf monitor | tee esp_log.txt' # Monitor and save log
alias esp-debug='idf openocd gdb' # Start GDB debugging
# ==============================================================================
# CONFIGURATION
# ==============================================================================
alias esp-menuconfig='idf menuconfig' # Configure project
alias esp-save-defconfig='idf save-defconfig' # Save default config
alias esp-show-defs='idf show-defconfig' # Show current config
# ==============================================================================
# PORT MANAGEMENT
# ==============================================================================
alias esp-ports='ls /dev/ttyUSB*' # List USB ports
alias esp-perms='sudo chmod 666 /dev/ttyUSB0' # Fix permissions
alias esp-reset-port='sudo systemctl restart brltty.service' # Reset USB ports
# ==============================================================================
# PROJECT MANAGEMENT
# ==============================================================================
alias esp-new='idf create-project' # Create new project
alias esp-examples='cd $IDF_PATH/examples' # Go to examples
alias esp-template='cp -r $IDF_PATH/examples/get-started/hello_world .' # Copy template
# ==============================================================================
# ESP8266 RTOS SDK
# ==============================================================================
alias get_8266='. $HOME/esp/ESP8266_RTOS_SDK/export.sh' # Load ESP8266 environment
alias esp8266-build='make' # Build ESP8266 project
alias esp8266-flash='make flash' # Flash ESP8266
alias esp8266-mon='make monitor' # Monitor ESP8266
# ==============================================================================
# PARTITION MANAGEMENT
# ==============================================================================
alias esp-part='idf partition_table' # Show partition table
alias esp-part-gen='python $IDF_PATH/components/partition_table/gen_esp32part.py' # Generate partition
alias esp-part-flash='idf partition_table-flash' # Flash partition table
# ==============================================================================
# OTA (OVER-THE-AIR) UPDATES
# ==============================================================================
alias esp-ota-build='idf app-flash' # Build for OTA
alias esp-ota-list='idf ota-list' # List OTA partitions
alias esp-ota-flash='idf ota-flash' # Flash via OTA
# ==============================================================================
# TESTING & ANALYSIS
# ==============================================================================
alias esp-test='idf test' # Run unit tests
alias esp-check='idf check-dependencies' # Check dependencies
alias esp-docs='idf docs' # Generate documentation
alias esp-analyze='idf analyze-size' # Analyze binary size
# ==============================================================================
# COMMON COMPONENT MANAGEMENT
# ==============================================================================
alias esp-list-comp='idf list-components' # List components
alias esp-get-comp='idf create-component' # Create new component
alias esp-reg-comp='idf register-components' # Register components
# ==============================================================================
# DEVELOPMENT UTILITIES
# ==============================================================================
alias esp-addr2line='xtensa-esp32-elf-addr2line' # Convert addresses to lines
alias esp-stack-decode='$IDF_PATH/tools/esp_stack_trace_parser.py' # Decode stack traces
alias esp-core-dump='espcoredump.py' # Analyze core dumps
# ==============================================================================
# QUICK ACCESS TO COMMON DIRECTORIES
# ==============================================================================
alias esp-home='cd $HOME/esp' # Go to ESP root directory
alias esp-idf='cd $IDF_PATH' # Go to IDF directory
alias esp-tools='cd $IDF_PATH/tools' # Go to IDF tools
alias esp-proj='cd $HOME/esp/projects' # Go to projects directory
# ==============================================================================
# END OF ESP DEVELOPMENT ALIASES
# ==============================================================================