iotile / coretools

Core python tools for building and using IOTile based devices
GNU General Public License v3.0
14 stars 7 forks source link

Mindtribe has trouble loading firmware on the lpc824 with new installations of coretools (py2 or py3) #843

Open ekkizogloy opened 5 years ago

ekkizogloy commented 5 years ago

They have a working installation with python2.7 however they are unable to recreate it.

WORKING PYTHON 2 VIRTUALENV INSTALLED A FEW MONTHS AGO The commands used were something like this:

virtualenv --python=python2.7 iotile
source iotile/bin/activate
sudo pip install iotile-core iotile-test iotile-emulate iotile-transport-bled112
sudo pip install -U iotile-support-con-nrf52832-3 iotile-transport-jlink iotile-support-lib-controller-3
sudo pip install iotile-sensorgraph
sudo pip install iotile-build
sudo pip install iotile-ext-cloud

(iotile) AMAC02XJ19JJGH6:EVT mike.ho$ pip list
Package                         Version
------------------------------- ----------
alabaster                       0.7.12
asciimatics                     1.10.0
Babel                           2.6.0
backports.functools-lru-cache   1.5
breathe                         4.11.1
certifi                         2018.11.29
chardet                         3.0.4
configparser                    3.7.1
crcmod                          1.7
cycler                          0.10.0
decorator                       4.3.2
docutils                        0.14
entrypoints                     0.3
enum34                          1.1.6
future                          0.17.1
idna                            2.8
imagesize                       1.1.0
iotile-build                    2.7.0
iotile-cloud                    0.9.9
iotile-core                     3.26.3
iotile-emulate                  0.2.0
iotile-ext-cloud                0.6.0
iotile-sensorgraph              0.8.1
iotile-support-con-nrf52832-3   3.1.12
iotile-support-lib-controller-3 3.7.13
iotile-test                     0.11.0
iotile-transport-bled112        1.8.0
iotile-transport-jlink          0.3.1
Jinja2                          2.10
kiwisolver                      1.0.1
MarkupSafe                      1.1.0
matplotlib                      2.2.3
monotonic                       1.5
msgpack                         0.6.1
numpy                           1.16.1
packaging                       19.0
Pillow                          6.0.0
pip                             19.0.3
psutil                          5.5.0
py2                             0.1.0
pycparser                       2.19
pyfiglet                        0.8.post1
Pygments                        2.3.1
pygtrie                         2.3
pylibftdi                       0.17.0
pylink-square                   0.1.3
pyparsing                       2.2.2
pyserial                        3.4
python-dateutil                 2.7.5
pytz                            2018.9
requests                        2.21.0
setuptools                      40.8.0
six                             1.12.0
snowballstemmer                 1.2.1
sortedcontainers                2.1.0
Sphinx                          1.8.3
sphinxcontrib-websupport        1.1.0
subprocess32                    3.5.3
toposort                        1.5
typedargs                       0.13.2
typing                          3.6.6
urllib3                         1.24.1
wcwidth                         0.1.7
wheel                           0.33.1
ws4py                           0.5.1
----------------------------------------------

PYTHON 3 VIRTUALENV NEWLY CREATED THIS MORNING

The commands used were something like this:

virtualenv --python=python3 iotile3
source iotile3/bin/activate
sudo pip install iotile-core iotile-test iotile-emulate iotile-transport-bled112
sudo pip install -U iotile-support-con-nrf52832-3 iotile-transport-jlink iotile-support-lib-controller-3
sudo pip install iotile-sensorgraph
sudo pip install iotile-build
sudo pip install iotile-ext-cloud

(iotile3) AMAC02XJ19JJGH6:EVT mike.ho$ pip list

Package                         Version
------------------------------- ------------
alabaster                       0.7.12
Babel                           2.7.0
breathe                         4.13.0.post0
certifi                         2019.6.16
chardet                         3.0.4
crcmod                          1.7
cycler                          0.10.0
decorator                       4.4.0
docutils                        0.14
entrypoints                     0.3
future                          0.17.1
idna                            2.8
imagesize                       1.1.0
iotile-build                    3.0.9
iotile-cloud                    0.9.9
iotile-core                     5.0.2
iotile-emulate                  0.5.0
iotile-ext-cloud                1.0.9
iotile-sensorgraph              1.0.7
iotile-support-con-nrf52832-3   3.2.4
iotile-support-lib-controller-3 3.7.17
iotile-test                     2.0.0
iotile-transport-bled112        3.0.0
iotile-transport-jlink          1.0.8
Jinja2                          2.10.1
kiwisolver                      1.1.0
MarkupSafe                      1.1.1
matplotlib                      2.0.2
msgpack                         0.6.1
numpy                           1.16.4
packaging                       19.0
pip                             19.1.1
psutil                          5.6.3
pycparser                       2.19
Pygments                        2.4.2
pygtrie                         2.3
pylibftdi                       0.17.0
pylink-square                   0.2.0
pyparsing                       2.2.2
pyserial                        3.4
python-dateutil                 2.8.0
pytz                            2019.1
requests                        2.22.0
setuptools                      41.0.1
six                             1.12.0
snowballstemmer                 1.2.1
sortedcontainers                2.1.0
Sphinx                          2.1.2
sphinxcontrib-applehelp         1.0.1
sphinxcontrib-devhelp           1.0.1
sphinxcontrib-htmlhelp          1.0.2
sphinxcontrib-jsmath            1.0.1
sphinxcontrib-qthelp            1.0.2
sphinxcontrib-serializinghtml   1.1.3
toposort                        1.5
typedargs                       1.0.1
urllib3                         1.25.3
wheel                           0.33.4

Here’s the error output from trying to program the LPC (iotile hw --port=jlink debug -c device=lpc824 flash executive_tile.elf):

DeviceAdapterError: Operation connect on conn 0 failed because HardwareError: Could not find control structure magic value in search area

Additional Information:
reason: HardwareError: Could not find control structure magic value in search area
operation: connect
conn_id: 0
timburke commented 5 years ago

This is a known issue with the current jlink transport plugin. There are two potential solutions:

The issue is fixed in the jlink upgrade branch created by Sirin but it needs to be tested in the following ways before merging:

On Thu, Jun 20, 2019, 7:26 AM ekkizogloy notifications@github.com wrote:

They have a working installation with python2.7 however they are unable to recreate it.

WORKING PYTHON 2 VIRTUALENV INSTALLED A FEW MONTHS AGO The commands used were something like this:

virtualenv --python=python2.7 iotile

source iotile/bin/activate

sudo pip install iotile-core iotile-test iotile-emulate iotile-transport-bled112

sudo pip install -U iotile-support-con-nrf52832-3 iotile-transport-jlink iotile-support-lib-controller-3

sudo pip install iotile-sensorgraph

sudo pip install iotile-build

sudo pip install iotile-ext-cloud

(iotile) AMAC02XJ19JJGH6:EVT mike.ho$ pip list

Package Version


alabaster 0.7.12

asciimatics 1.10.0

Babel 2.6.0

backports.functools-lru-cache 1.5

breathe 4.11.1

certifi 2018.11.29

chardet 3.0.4

configparser 3.7.1

crcmod 1.7

cycler 0.10.0

decorator 4.3.2

docutils 0.14

entrypoints 0.3

enum34 1.1.6

future 0.17.1

idna 2.8

imagesize 1.1.0

iotile-build 2.7.0

iotile-cloud 0.9.9

iotile-core 3.26.3

iotile-emulate 0.2.0

iotile-ext-cloud 0.6.0

iotile-sensorgraph 0.8.1

iotile-support-con-nrf52832-3 3.1.12

iotile-support-lib-controller-3 3.7.13

iotile-test 0.11.0

iotile-transport-bled112 1.8.0

iotile-transport-jlink 0.3.1

Jinja2 2.10

kiwisolver 1.0.1

MarkupSafe 1.1.0

matplotlib 2.2.3

monotonic 1.5

msgpack 0.6.1

numpy 1.16.1

packaging 19.0

Pillow 6.0.0

pip 19.0.3

psutil 5.5.0

py2 0.1.0

pycparser 2.19

pyfiglet 0.8.post1

Pygments 2.3.1

pygtrie 2.3

pylibftdi 0.17.0

pylink-square 0.1.3

pyparsing 2.2.2

pyserial 3.4

python-dateutil 2.7.5

pytz 2018.9

requests 2.21.0

setuptools 40.8.0

six 1.12.0

snowballstemmer 1.2.1

sortedcontainers 2.1.0

Sphinx 1.8.3

sphinxcontrib-websupport 1.1.0

subprocess32 3.5.3

toposort 1.5

typedargs 0.13.2

typing 3.6.6

urllib3 1.24.1

wcwidth 0.1.7

wheel 0.33.1

ws4py 0.5.1


PYTHON 3 VIRTUALENV NEWLY CREATED THIS MORNING

The commands used were something like this:

virtualenv --python=python3 iotile3

source iotile3/bin/activate

sudo pip install iotile-core iotile-test iotile-emulate iotile-transport-bled112

sudo pip install -U iotile-support-con-nrf52832-3 iotile-transport-jlink iotile-support-lib-controller-3

sudo pip install iotile-sensorgraph

sudo pip install iotile-build

sudo pip install iotile-ext-cloud

(iotile3) AMAC02XJ19JJGH6:EVT mike.ho$ pip list

Package Version


alabaster 0.7.12

Babel 2.7.0

breathe 4.13.0.post0

certifi 2019.6.16

chardet 3.0.4

crcmod 1.7

cycler 0.10.0

decorator 4.4.0

docutils 0.14

entrypoints 0.3

future 0.17.1

idna 2.8

imagesize 1.1.0

iotile-build 3.0.9

iotile-cloud 0.9.9

iotile-core 5.0.2

iotile-emulate 0.5.0

iotile-ext-cloud 1.0.9

iotile-sensorgraph 1.0.7

iotile-support-con-nrf52832-3 3.2.4

iotile-support-lib-controller-3 3.7.17

iotile-test 2.0.0

iotile-transport-bled112 3.0.0

iotile-transport-jlink 1.0.8

Jinja2 2.10.1

kiwisolver 1.1.0

MarkupSafe 1.1.1

matplotlib 2.0.2

msgpack 0.6.1

numpy 1.16.4

packaging 19.0

pip 19.1.1

psutil 5.6.3

pycparser 2.19

Pygments 2.4.2

pygtrie 2.3

pylibftdi 0.17.0

pylink-square 0.2.0

pyparsing 2.2.2

pyserial 3.4

python-dateutil 2.8.0

pytz 2019.1

requests 2.22.0

setuptools 41.0.1

six 1.12.0

snowballstemmer 1.2.1

sortedcontainers 2.1.0

Sphinx 2.1.2

sphinxcontrib-applehelp 1.0.1

sphinxcontrib-devhelp 1.0.1

sphinxcontrib-htmlhelp 1.0.2

sphinxcontrib-jsmath 1.0.1

sphinxcontrib-qthelp 1.0.2

sphinxcontrib-serializinghtml 1.1.3

toposort 1.5

typedargs 1.0.1

urllib3 1.25.3

wheel 0.33.4

Here’s the error output from trying to program the LPC (iotile hw --port=jlink debug -c device=lpc824 flash executive_tile.elf):

DeviceAdapterError: Operation connect on conn 0 failed because HardwareError: Could not find control structure magic value in search area

Additional Information:

reason: HardwareError: Could not find control structure magic value in search area

operation: connect

conn_id: 0

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/iotile/coretools/issues/843?email_source=notifications&email_token=AASP7N7Z5P2K3UDEBIIUP63P3OHP5A5CNFSM4HZTTCCKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4G2XCGOA, or mute the thread https://github.com/notifications/unsubscribe-auth/AASP7N4PIOY5SSWQJ5OGLODP3OHP5ANCNFSM4HZTTCCA .

ekkizogloy commented 5 years ago

I will arrange to test this. It seems like these tests should live somewhere along with instructions on the setup needed. Do you have any suggestions?

timburke commented 5 years ago

Note that most of these tests except the flashing test require the corresponding firmware upgrades so I guess the real test that is needed is to make sure the new jlink plugin works in a backwards compatible way with current firmware.

In terms of where the tests live, not sure the best place. The current place of record for firmware wide things is ArchWiki hardware/firmware section: https://github.com/iotile/ArchWiki/wiki/Hardware-Firmware-Overview

x24ling commented 5 years ago

One other point where we may want to push that merge soon, it's slightly tricker to set UUIDs via GDB.

I remember in the past there was an additional step where you will need to access the MAC address directly in flash via gdb, connect to it via that address, and then set the UUID.

timburke commented 5 years ago

@x24ling Agreed, but just to clarify the actual problem here: setting UUIDs and any other RPC based interaction should still work on python 2 and 3 without issue. The issue is only that iotile hw debug reflash that does not use rpcs but directly writes a new flash image using the SWD protocol (and requires no working firmware to function) is broken in the latest jlink plugin.

mattrunchey commented 4 years ago

This issue is marked as high priority but hasn't seen updates here in a while. Does https://github.com/iotile/coretools/pull/882 resolve this @anwu ?

anwu commented 4 years ago

I don't think so. @x24ling I remember a few days ago, I was looking into issues within iotileship. I remember seeing issues with connections to the lpc because of a it couldn't find the magic within the control structure. This is the same issue right? You and Luke have just been using a workaround?

ekkizogloy commented 4 years ago

Is this using a jtag w/ tagconnect and the iotile debug? or using the bled112 with the remote_bridge? The issue I was having was a hardware issue with the JTAG and an FTDI mux board.

Luke Ekkizogloy Embedded Architect Arch Systems Inc. m: 720.336.0347 a: 380 Portage Ave. Palo Alto, CA 94306 w: archsys.io e: lekkizogloy@archsys.io

On Thu, Oct 31, 2019 at 5:47 PM Andrew Wu notifications@github.com wrote:

I don't think so. @x24ling https://github.com/x24ling I remember a few days ago, I was looking into issues within iotileship. I remember seeing issues with connections to the lpc because of a it couldn't find the magic within the control structure. This is the same issue right? You and Luke have just been using a workaround?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/iotile/coretools/issues/843?email_source=notifications&email_token=AAFA53V3BLGN6VYTKRTBRHTQRN4D3A5CNFSM4HZTTCCKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECZVNMQ#issuecomment-548624050, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFA53USZSSEJOVZXYMA3VDQRN4D3ANCNFSM4HZTTCCA .

anwu commented 4 years ago

Last time when I was working with Chris, it was jtag w/ tag connect that has the mux also.