Skip to content
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

dist/tools/cc2538-bsl: use upstream version #13568

Merged
merged 1 commit into from
Mar 6, 2020

Conversation

benpicco
Copy link
Contributor

@benpicco benpicco commented Mar 6, 2020

Contribution description

Automatically fetch the upstream version of cc2538-bsl.py instead of maintaining our own fork of the tool.

Testing procedure

Flash one of the supported boards, e.g openmote-b.
cc2538-bsl.py should automatically be downloaded.

Issues/PRs references

fixes #13566

Automatically fetch the upstream version of cc2538-bsl.py instead
of maintaining our own fork of the tool.

fixes RIOT-OS#13566
@benpicco benpicco added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation Area: tools Area: Supplementary tools labels Mar 6, 2020
@fjmolinas
Copy link
Contributor

Before doing this are there divergence between the two versions? Can we open a PR upstream for whatever divergence we have?

@benpicco
Copy link
Contributor Author

benpicco commented Mar 6, 2020

Looking at the history it seems like our fork was mostly concerned with Python2 <-> Python3 shenanigans.
The only functional change e0b6f16: cc2538-bsl.py: add chip id for cc2538em is also included in the upstream version.

@fjmolinas
Copy link
Contributor

No changes when flashing openmote-b

make: Entering directory '/home/francisco/workspace/RIOT2/examples/gnrc_networking'
Building application "gnrc_networking" for "openmote-b" with MCU "cc2538".

[INFO] cc2538-bsl.py not found - fetching it from GitHub now
CC= CFLAGS= make -C /home/francisco/workspace/RIOT2/dist/tools/cc2538-bsl
make[1]: Entering directory '/home/francisco/workspace/RIOT2/examples/gnrc_networking'
make[1]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
[INFO] cloning cc2538-bsl
Cloning into '/home/francisco/workspace/RIOT2/dist/tools/cc2538-bsl/bin'...
"make" -C /home/francisco/workspace/RIOT2/boards/openmote-b
"make" -C /home/francisco/workspace/RIOT2/core
"make" -C /home/francisco/workspace/RIOT2/cpu/cc2538
remote: Enumerating objects: 25, done.
remote: Counting objects: 100% (25/25), done.
remote: Compressing objects: 100% (20/20), done.
remote: Total 412 (delta 11), reused 15 (delta 5), pack-reused 387
Receiving objects: 100% (412/412), 148.33 KiB | 825.00 KiB/s, done.
Resolving deltas: 100% (179/179), done.
HEAD is now at 733e6f5 Merge pull request #92 from smlng/py3
[INFO] updating cc2538-bsl /home/francisco/workspace/RIOT2/dist/tools/cc2538-bsl/bin/.pkg-state.git-downloaded
"make" -C /home/francisco/workspace/RIOT2/cpu/cc2538/periph
echo 733e6f5b496402e40ad6d12df3d0372e205b8883 > /home/francisco/workspace/RIOT2/dist/tools/cc2538-bsl/bin/.pkg-state.git-downloaded
[INFO] patch cc2538-bsl
cp /home/francisco/workspace/RIOT2/dist/tools/cc2538-bsl/bin/cc2538-bsl.py .
make[1]: Leaving directory '/home/francisco/workspace/RIOT2/dist/tools/cc2538-bsl'
[INFO] cc2538-bsl.py successfully fetched!
"make" -C /home/francisco/workspace/RIOT2/cpu/cc2538/radio
"make" -C /home/francisco/workspace/RIOT2/cpu/cortexm_common
"make" -C /home/francisco/workspace/RIOT2/drivers
"make" -C /home/francisco/workspace/RIOT2/drivers/netdev_ieee802154
"make" -C /home/francisco/workspace/RIOT2/drivers/periph_common
"make" -C /home/francisco/workspace/RIOT2/cpu/cortexm_common/periph
"make" -C /home/francisco/workspace/RIOT2/sys
"make" -C /home/francisco/workspace/RIOT2/sys/auto_init
"make" -C /home/francisco/workspace/RIOT2/sys/div
"make" -C /home/francisco/workspace/RIOT2/sys/evtimer
"make" -C /home/francisco/workspace/RIOT2/sys/fmt
"make" -C /home/francisco/workspace/RIOT2/sys/isrpipe
"make" -C /home/francisco/workspace/RIOT2/sys/luid
"make" -C /home/francisco/workspace/RIOT2/sys/net/crosslayer/inet_csum
"make" -C /home/francisco/workspace/RIOT2/sys/net/gnrc
"make" -C /home/francisco/workspace/RIOT2/sys/net/gnrc/netapi
"make" -C /home/francisco/workspace/RIOT2/sys/net/gnrc/netif
"make" -C /home/francisco/workspace/RIOT2/sys/net/gnrc/netreg
"make" -C /home/francisco/workspace/RIOT2/sys/net/gnrc/network_layer/icmpv6
"make" -C /home/francisco/workspace/RIOT2/sys/net/gnrc/network_layer/icmpv6/echo
"make" -C /home/francisco/workspace/RIOT2/sys/net/gnrc/network_layer/icmpv6/error
"make" -C /home/francisco/workspace/RIOT2/sys/net/gnrc/netif/hdr
"make" -C /home/francisco/workspace/RIOT2/sys/net/link_layer/ieee802154
"make" -C /home/francisco/workspace/RIOT2/sys/net/gnrc/netif/ieee802154
"make" -C /home/francisco/workspace/RIOT2/sys/net/link_layer/l2util
"make" -C /home/francisco/workspace/RIOT2/sys/net/netif
"make" -C /home/francisco/workspace/RIOT2/sys/net/gnrc/netif/init_devs
"make" -C /home/francisco/workspace/RIOT2/sys/net/gnrc/network_layer/ipv6
"make" -C /home/francisco/workspace/RIOT2/sys/net/network_layer/icmpv6
"make" -C /home/francisco/workspace/RIOT2/sys/net/network_layer/ipv6/addr
"make" -C /home/francisco/workspace/RIOT2/sys/net/network_layer/ipv6/hdr
"make" -C /home/francisco/workspace/RIOT2/sys/net/network_layer/sixlowpan
"make" -C /home/francisco/workspace/RIOT2/sys/net/gnrc/network_layer/ipv6/hdr
"make" -C /home/francisco/workspace/RIOT2/sys/net/gnrc/network_layer/ipv6/nib
"make" -C /home/francisco/workspace/RIOT2/sys/net/transport_layer/udp
"make" -C /home/francisco/workspace/RIOT2/sys/newlib_syscalls_default
"make" -C /home/francisco/workspace/RIOT2/sys/net/gnrc/network_layer/ndp
"make" -C /home/francisco/workspace/RIOT2/sys/od
"make" -C /home/francisco/workspace/RIOT2/sys/ps
"make" -C /home/francisco/workspace/RIOT2/sys/random
"make" -C /home/francisco/workspace/RIOT2/sys/random/tinymt32
"make" -C /home/francisco/workspace/RIOT2/sys/shell
"make" -C /home/francisco/workspace/RIOT2/sys/shell/commands
"make" -C /home/francisco/workspace/RIOT2/sys/net/gnrc/network_layer/sixlowpan
"make" -C /home/francisco/workspace/RIOT2/sys/stdio_uart
"make" -C /home/francisco/workspace/RIOT2/sys/net/gnrc/network_layer/sixlowpan/ctx
"make" -C /home/francisco/workspace/RIOT2/sys/trickle
"make" -C /home/francisco/workspace/RIOT2/sys/tsrb
"make" -C /home/francisco/workspace/RIOT2/sys/net/gnrc/network_layer/sixlowpan/frag
"make" -C /home/francisco/workspace/RIOT2/sys/xtimer
"make" -C /home/francisco/workspace/RIOT2/sys/net/gnrc/network_layer/sixlowpan/frag/fb
"make" -C /home/francisco/workspace/RIOT2/sys/net/gnrc/network_layer/sixlowpan/frag/rb
"make" -C /home/francisco/workspace/RIOT2/sys/net/gnrc/network_layer/sixlowpan/iphc
"make" -C /home/francisco/workspace/RIOT2/sys/net/gnrc/network_layer/sixlowpan/nd
"make" -C /home/francisco/workspace/RIOT2/sys/net/gnrc/pkt
"make" -C /home/francisco/workspace/RIOT2/sys/net/gnrc/pktbuf
"make" -C /home/francisco/workspace/RIOT2/sys/net/gnrc/pktbuf_static
"make" -C /home/francisco/workspace/RIOT2/sys/net/gnrc/pktdump
"make" -C /home/francisco/workspace/RIOT2/sys/net/gnrc/routing/rpl
"make" -C /home/francisco/workspace/RIOT2/sys/net/gnrc/transport_layer/udp
   text    data     bss     dec     hex filename
  85816     180   19088  105084   19a7c /home/francisco/workspace/RIOT2/examples/gnrc_networking/bin/openmote-b/gnrc_networking.elf
/home/francisco/workspace/RIOT2/dist/tools/cc2538-bsl/cc2538-bsl.py -p "/dev/riot/tty-openmote-b" --bootloader-invert-lines -e -w -v -b 460800 /home/francisco/workspace/RIOT2/examples/gnrc_networking/bin/openmote-b/gnrc_networking.hex
Opening port /dev/riot/tty-openmote-b, baud 460800
Reading data from /home/francisco/workspace/RIOT2/examples/gnrc_networking/bin/openmote-b/gnrc_networking.hex
Your firmware looks like an Intel Hex file
Connecting to target...
CC2538 PG2.0: 512KB Flash, 32KB SRAM, CCFG at 0x0027FFD4
Primary IEEE Address: 00:12:4B:00:14:B5:B5:AF
    Performing mass erase
Erasing 524288 bytes starting at address 0x00200000
    Erase done
Writing 524288 bytes starting at address 0x00200000
Write 16 bytes at 0x0027FFF0F8
    Write done                                
Verifying by comparing CRC32 calculations.
    Verified (match: 0x865b66f5)
/home/francisco/workspace/RIOT2/dist/tools/pyterm/pyterm -p "/dev/riot/tty-openmote-b" -b "115200" 
2020-03-06 11:28:55,492 # Connect to serial port /dev/riot/tty-openmote-b
Welcome to pyterm!
Type '/exit' to exit.
help
2020-03-06 11:29:02,868 # help
2020-03-06 11:29:02,870 # Command              Description
2020-03-06 11:29:02,884 # ---------------------------------------
2020-03-06 11:29:02,885 # udp                  send data over UDP and listen on UDP ports
2020-03-06 11:29:02,886 # reboot               Reboot the node
2020-03-06 11:29:02,887 # ps                   Prints information about running threads.
2020-03-06 11:29:02,900 # ping6                Ping via ICMPv6
2020-03-06 11:29:02,901 # random_init          initializes the PRNG
2020-03-06 11:29:02,902 # random_get           returns 32 bit of pseudo randomness
2020-03-06 11:29:02,916 # nib                  Configure neighbor information base
2020-03-06 11:29:02,917 # ifconfig             Configure network interfaces
2020-03-06 11:29:02,918 # rpl                  rpl configuration tool ('rpl help' for more information)
2020-03-06 11:29:02,932 # 6ctx                 6LoWPAN context configuration tool

Copy link
Contributor

@fjmolinas fjmolinas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see any difference with upstream and works locally, lets give the ci a run ACK.

@fjmolinas fjmolinas added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Mar 6, 2020
@benpicco benpicco merged commit dbe1270 into RIOT-OS:master Mar 6, 2020
@benpicco benpicco deleted the cc2538-bsl.py-upstream branch March 6, 2020 13:08
@leandrolanzieri leandrolanzieri added this to the Release 2020.04 milestone Mar 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: tools Area: Supplementary tools CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CC2538-bsl submodule
3 participants