Skip to content

Commit

Permalink
add script to generate xml TGZ file
Browse files Browse the repository at this point in the history
  • Loading branch information
pwittich committed Jul 30, 2024
1 parent 9210313 commit 0a7f080
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,4 @@ PL_MEM_CM_rev1.xml
PL_MEM_CM_rev2.xml
projects/cm_mcu/MonI2C_addresses.c
projects/cm_mcu/MonI2C_addresses.h
CornellCM_MCU.tgz
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,19 @@ check-and-reinit-submodules:

release:
@$(MAKE) -C projects/cm_mcu release
@if [ 'x${VERBOSE}' = x ]; then \
echo " SH make_release_xml_tgz.sh"; \
else \
echo " ./make_release_xml_tgz.sh"; \
fi
@./make_release_xml_tgz.sh

check-for-pr: format
@if [ 'x${VERBOSE}' = x ]; then \
echo " SH buildall.sh"; \
else \
echo " ./build_all.sh"; \
fi
@./buildall.sh


Expand Down
23 changes: 23 additions & 0 deletions make_release_xml_tgz.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#! /bin/sh

# exit on error
set -e

# keep track of the last executed command
trap 'last_command=$current_command; current_command=$BASH_COMMAND' DEBUG
# echo an error message before exiting
trap 'echo "\"${last_command}\" command failed with exit code $?."' ERR


[ -d tmp ] && rm -rf tmp

mkdir -p tmp/CornellCM_MCU/address_table/modules_CM_MCU
cd tmp
cp ../PL_MEM*.xml CornellCM_MCU/address_table/modules_CM_MCU
cp ../sm_cm_config/data/*.xml CornellCM_MCU/address_table
cd CornellCM_MCU/address_table/modules_CM_MCU
ln -s PL_MEM_CM_Rev2.xml PL_MEM_CM.xml
cd ../../..
tar -czf ../CornellCM_MCU.tgz CornellCM_MCU
cd ..
rm -rf tmp
3 changes: 3 additions & 0 deletions sm_cm_config/data/address_apollo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<node id="TOP">
<node id="PL_MEM_CM" address="0x23000000" fwinfo="uio_endpoint" module="file://modules_CM_MCU/PL_MEM_CM.xml" />
</node>
3 changes: 3 additions & 0 deletions sm_cm_config/data/connections.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<node id="TOP">
<node id="PL_MEM_CM" address="0x23000000" fwinfo="uio_endpoint" module="file://modules_CM_MCU/PL_MEM_CM.xml" />
</node>

0 comments on commit 0a7f080

Please sign in to comment.