Skip to content

Sorted boards.txt + added board-sorting script for future use #7557

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions boards.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16489,7 +16489,7 @@ deneyapkart1A.menu.CPUFreq.80=80MHz (WiFi/BT)
deneyapkart1A.menu.CPUFreq.80.build.f_cpu=80000000L
deneyapkart1A.menu.CPUFreq.40=40MHz
deneyapkart1A.menu.CPUFreq.40.build.f_cpu=40000000L
deneyapkart1A.menu.CPUFreq.20=20MHz
deneyapkart1A.menu.CPUFreq.20=20MHz
deneyapkart1A.menu.CPUFreq.20.build.f_cpu=20000000L
deneyapkart1A.menu.CPUFreq.10=10MHz
deneyapkart1A.menu.CPUFreq.10.build.f_cpu=10000000L
Expand Down Expand Up @@ -17132,7 +17132,7 @@ deneyapminiv2.menu.EraseFlash.all.upload.erase_cmd=-

##############################################################

deneyapkartg.name=Deneyap Kart G
deneyapkartg.name=Deneyap Kart G

deneyapkartg.vid.0=0x303A
deneyapkartg.pid.0=0x814A
Expand Down Expand Up @@ -20456,3 +20456,7 @@ esp32c3m1IKit.menu.EraseFlash.all=Enabled
esp32c3m1IKit.menu.EraseFlash.all.upload.erase_cmd=-e

##############################################################
##############################################################

##############################################################

40 changes: 40 additions & 0 deletions tools/sort_boards.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
DELIMITER_LINE="3RD PARTY BOARDS BELOW"
START_LINE="DO NOT PUT BOARDS ABOVE THE OFFICIAL ESPRESSIF BOARDS!"

# delete all lines after pattern | get lines with .name | swap human-readable name and parameter and split with semicolon | sort them > cache to file
sed -n '/^.*'"$DELIMITER_LINE"'/q;p' ../boards.txt | grep ".*name=" | sed -E "s/(^.*).name=(.*$)/\2\;\1/" | sort > espressif_board_list.txt

# delete all lines before pattern | get lines with .name | swap human-readable name and parameter and split with semicolon | sort them > cache to file
sed '0,/'"$DELIMITER_LINE"'/d' ../boards.txt | grep ".*name=" | sed -E "s/(^.*).name=(.*$)/\2\;\1/" | sort > 3rd_party_board_list.txt

# put header
sed '1,/'^.*"$START_LINE".*$'/!d' ../boards.txt > sorted_boards.txt
echo "##############################################################" >> sorted_boards.txt
echo "" >> sorted_boards.txt

while read line; do
board=$(echo $line | sed -n -e 's/^.*;//p')
#echo "working on board \"$board\"; from line \"$line\""
grep "^$board\." ../boards.txt >> sorted_boards.txt
echo "" >> sorted_boards.txt
echo "##############################################################" >> sorted_boards.txt
echo "" >> sorted_boards.txt
done <espressif_board_list.txt

sed '1,/'^.*"$DELIMITER_LINE".*$'/!d' ../boards.txt > sorted_boards.txt
echo "##############################################################" >> sorted_boards.txt
echo "" >> sorted_boards.txt

while read line; do
board=$(echo $line | sed -n -e 's/^.*;//p')
#echo "working on board \"$board\"; from line \"$line\""
grep "^$board\." ../boards.txt >> sorted_boards.txt
echo "" >> sorted_boards.txt
echo "##############################################################" >> sorted_boards.txt
echo "" >> sorted_boards.txt
done <3rd_party_board_list.txt


rm espressif_board_list.txt
rm 3rd_party_board_list.txt
mv sorted_boards.txt ../boards.txt