lists.osmocom.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
List overview
Download
simtrace
March 2018
----- 2024 -----
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
simtrace@lists.osmocom.org
1 participants
1 discussions
Start a n
N
ew thread
Compiling and running simtrace firmware with a recent toolchain
by Denis 'GNUtoo' Carikli
Hi, The simtrace firmware is in the OpenPCD git repository at: >
git://git.osmocom.org/openpcd.git
I used the last revision at the time of writing: > dc2983d firmware: Makefiles: enable changing toolchain With a fairly recent gcc version: > $ arm-none-eabi-gcc --version > arm-none-eabi-gcc (Arch Repository) 7.3.0 > Copyright (C) 2017 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There > is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A > PARTICULAR PURPOSE. Compiling the firmware the usual way works, with many warnings: > $ make BOARD=SIMTRACE DEBUG=1 TARGET=main_simtrace \ > CROSS_COMPILE=arm-none-eabi- [...] Installing that firmware went fine: > $ sudo dfu-util -d 16c0:0762 -a0 -D ./main_simtrace.bin -R > dfu-util 0.9 > > Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc. > Copyright 2010-2016 Tormod Volden and Stefan Schmidt > This program is Free Software and has ABSOLUTELY NO WARRANTY > Please report bugs to
http://sourceforge.net/p/dfu-util/tickets/
> > dfu-util: Invalid DFU suffix signature > dfu-util: A valid DFU suffix will be required in a future dfu-util > release!!! Opening DFU capable USB device... > ID 16c0:0762 > Run-time device DFU version 0100 > Claiming USB DFU Interface... > Setting Alternate Setting #0 ... > Determining device status: state = dfuIDLE, status = 0 > dfuIDLE, continuing > DFU mode device DFU version 0100 > Device returned transfer size 256 > Copying data from PC to DFU device > Download [=========================] 100% 23084 bytes > Download done. > state(7) = dfuMANIFEST, status(0) = No error condition is present > state(2) = dfuIDLE, status(0) = No error condition is present > Done! > dfu-util: can't detach > Resetting USB to switch back to runtime mode Unfortunately with the new compiler the device gets re-enumerated continuously: > usb 4-1: new full-speed USB device number 3 using uhci_hcd > usb 4-1: new full-speed USB device number 4 using uhci_hcd > usb 4-1: new full-speed USB device number 5 using uhci_hcd [...] Here's what I have on the serial port: > [000000] > [000001] (C) 2006-2011 by Harald Welte <hwelte(a)hmw-consulting.de> > This software is FREE SOFTWARE licensed under GNU GPL > [000002] Version 0.5.30-dc29 compiled 20180309-165435 by gnutoo@second-laptop > > [000003] > DEBUG Interface: > 0) Set Pull-up 1) Clear Pull-up 2) Toggle LED1 3) Toggle LED2 > 9) Reset > [000004] RSTC_SR=0x00010000 > [000005] LARGE req_ctx[00] initialized at 002055AC, Data: 00200A68 => 00200E28 > [000006] LARGE req_ctx[01] initialized at 002055C0, Data: 00200E28 => 002011E8 > [000007] LARGE req_ctx[02] initialized at 002055D4, Data: 002011E8 => 002015A8 > [000008] LARGE req_ctx[03] initialized at 002055E8, Data: 002015A8 => 00201968 > [000009] LARGE req_ctx[04] initialized at 002055FC, Data: 00201968 => 00201D28 > [00000A] LARGE req_ctx[05] initialized at 00205610, Data: 00201D28 => 002020E8 > [00000B] LARGE req_ctx[06] initialized at 00205624, Data: 002020E8 => 002024A8 > [00000C] LARGE req_ctx[07] initialized at 00205638, Data: 002024A8 => 00202868 > [00000D] LARGE req_ctx[08] initialized at 0020564C, Data: 00202868 => 00202C28 > [00000E] LARGE req_ctx[09] initialized at 00205660, Data: 00202C28 => 00202FE8 > [00000F] LARGE req_ctx[10] initialized at 00205674, Data: 00202FE8 => 002033A8 > [000010] LARGE req_ctx[11] initialized at 00205688, Data: 002033A8 => 00203768 > [000011] LARGE req_ctx[12] initialized at 0020569C, Data: 00203768 => 00203B28 > [000012] LARGE req_ctx[13] initialized at 002056B0, Data: 00203B28 => 00203EE8 > [000013] LARGE req_ctx[14] initialized at 002056C4, Data: 00203EE8 => 002042A8 > [000014] LARGE req_ctx[15] initialized at 002056D8, Data: 002042A8 => 00204668 > [000015] LARGE req_ctx[16] initialized at 002056EC, Data: 00204668 => 00204A28 > [000016] LARGE req_ctx[17] initialized at 00205700, Data: 00204A28 => 00204DE8 > [000017] LARGE req_ctx[18] initialized at 00205714, Data: 00204DE8 => 002051A8 > [000018] LARGE req_ctx[19] initialized at 00205728, Data: 002051A8 => 00205568 > [000019] Inititalizing usbcmd_gen_init > [00001A] udp_open(440): entering > [00001B] USART Initializing > [00001C] pio_irq_register(109): registering handler 001079bc for PIOA 7 > [00001D] RST > [00001E] computed Fi(1) Di(1) ratio: 372 > [000000] > [000001] (C) 2006-2011 by Harald Welte <hwelte(a)hmw-consulting.de> > This software is FREE SOFTWARE licensed under GNU GPL > [000002] Version 0.5.30-dc29 compiled 20180309-165435 by gnutoo@second-laptop > > [000003] > DEBUG Interface: > 0) Set Pull-up 1) Clear Pull-up 2) Toggle LED1 3) Toggle LED2 > 9) Reset > [000004] RSTC_SR=0x00010200 > [000005] LARGE req_ctx[00] initialized at 002055AC, Data: 00200A68 => 00200E28 > [000006] LARGE req_ctx[01] initialized at 002055C0, Data: 00200E28 => 002011E8 > [000007] LARGE req_ctx[02] initialized at 002055D4, Data: 002011E8 => 002015A8 > [000008] LARGE req_ctx[03] initialized at 002055E8, Data: 002015A8 => 00201968 > [000009] LARGE req_ctx[04] initialized at 002055FC, Data: 00201968 => 00201D28 > [00000A] LARGE req_ctx[05] initialized at 00205610, Data: 00201D28 => 002020E8 > [00000B] LARGE req_ctx[06] initialized at 00205624, Data: 002020E8 => 002024A8 > [00000C] LARGE req_ctx[07] initialized at 00205638, Data: 002024A8 => 00202868 > [00000D] LARGE req_ctx[08] initialized at 0020564C, Data: 00202868 => 00202C28 > [00000E] LARGE req_ctx[09] initialized at 00205660, Data: 00202C28 => 00202FE8 > [00000F] LARGE req_ctx[10] initialized at 00205674, Data: 00202FE8 => 002033A8 > [000010] LARGE req_ctx[11] initialized at 00205688, Data: 002033A8 => 00203768 > [000011] LARGE req_ctx[12] initialized at 0020569C, Data: 00203768 => 00203B28 > [000012] LARGE req_ctx[13] initialized at 002056B0, Data: 00203B28 => 00203EE8 > [000013] LARGE req_ctx[14] initialized at 002056C4, Data: 00203EE8 => 002042A8 > [000014] LARGE req_ctx[15] initialized at 002056D8, Data: 002042A8 => 00204668 > [000015] LARGE req_ctx[16] initialized at 002056EC, Data: 00204668 => 00204A28 > [000016] LARGE req_ctx[17] initialized at 00205700, Data: 00204A28 => 00204DE8 > [000017] LARGE req_ctx[18] initialized at 00205714, Data: 00204DE8 => 002051A8 > [000018] LARGE req_ctx[19] initialized at 00205728, Data: 002051A8 => 00205568 > [000019] Inititalizing usbcmd_gen_init > [00001A] udp_open(440): entering > [00001B] USART Initializing > [00001C] pio_irq_register(109): registering handler 001079bc for PIOA 7 > [00001D] RST > [00001E] computed Fi(1) Di(1) ratio: 372 > [000000] So it gets reset in a loop. I can get it to work with the following diff: --- a/firmware/src/simtrace/tc_etu.c +++ b/firmware/src/simtrace/tc_etu.c @@ -96,8 +96,8 @@ void tc_etu_init(void) ((unsigned int) 1 << AT91C_ID_TC0)); /* Connect TCLK0 to XC0 */ - tcb->TCB_BMR &= ~(AT91C_TCB_TC0XC0S); - tcb->TCB_BMR |= AT91C_TCB_TC0XC0S_TCLK0; +// tcb->TCB_BMR &= ~(AT91C_TCB_TC0XC0S); +// tcb->TCB_BMR |= AT91C_TCB_TC0XC0S_TCLK0; /* Register Interrupt handler */ AT91F_AIC_ConfigureIt(AT91C_BASE_AIC, AT91C_ID_TC0, @@ -124,5 +124,5 @@ void tc_etu_init(void) tcetu->TC_CCR = AT91C_TC_CLKEN; /* Reset to start timers */ - tcb->TCB_BCR = 1; +// tcb->TCB_BCR = 1; } With the diff I have the following on serial: > [000000] > [000001] (C) 2006-2011 by Harald Welte <hwelte(a)hmw-consulting.de> > This software is FREE SOFTWARE licensed under GNU GPL > [000002] Version 0.5.30-dc29-dirty compiled 20180309-165717 by gnutoo@second-laptop > > [000003] > DEBUG Interface: > 0) Set Pull-up 1) Clear Pull-up 2) Toggle LED1 3) Toggle LED2 > 9) Reset > [000004] RSTC_SR=0x00010000 > [000005] LARGE req_ctx[00] initialized at 00205630, Data: 00200AEC => 00200EAC > [000006] LARGE req_ctx[01] initialized at 00205644, Data: 00200EAC => 0020126C > [000007] LARGE req_ctx[02] initialized at 00205658, Data: 0020126C => 0020162C > [000008] LARGE req_ctx[03] initialized at 0020566C, Data: 0020162C => 002019EC > [000009] LARGE req_ctx[04] initialized at 00205680, Data: 002019EC => 00201DAC > [00000A] LARGE req_ctx[05] initialized at 00205694, Data: 00201DAC => 0020216C > [00000B] LARGE req_ctx[06] initialized at 002056A8, Data: 0020216C => 0020252C > [00000C] LARGE req_ctx[07] initialized at 002056BC, Data: 0020252C => 002028EC > [00000D] LARGE req_ctx[08] initialized at 002056D0, Data: 002028EC => 00202CAC > [00000E] LARGE req_ctx[09] initialized at 002056E4, Data: 00202CAC => 0020306C > [00000F] LARGE req_ctx[10] initialized at 002056F8, Data: 0020306C => 0020342C > [000010] LARGE req_ctx[11] initialized at 0020570C, Data: 0020342C => 002037EC > [000011] LARGE req_ctx[12] initialized at 00205720, Data: 002037EC => 00203BAC > [000012] LARGE req_ctx[13] initialized at 00205734, Data: 00203BAC => 00203F6C > [000013] LARGE req_ctx[14] initialized at 00205748, Data: 00203F6C => 0020432C > [000014] LARGE req_ctx[15] initialized at 0020575C, Data: 0020432C => 002046EC > [000015] LARGE req_ctx[16] initialized at 00205770, Data: 002046EC => 00204AAC > [000016] LARGE req_ctx[17] initialized at 00205784, Data: 00204AAC => 00204E6C > [000017] LARGE req_ctx[18] initialized at 00205798, Data: 00204E6C => 0020522C > [000018] LARGE req_ctx[19] initialized at 002057AC, Data: 0020522C => 002055EC > [000019] Inititalizing usbcmd_gen_init > [00001A] udp_open(440): entering > [00001B] USART Initializing > [00001C] pio_irq_register(109): registering handler 001079bc for PIOA 7 > [00001D] RST > [00001E] computed Fi(1) Di(1) ratio: 372 > [00001F] ISO_SW Initializing > [000020] pio_irq_register(109): registering handler 00107fb0 for PIOA 8 > [000021] pio_irq_register(109): registering handler 00107fdc for PIOA 25 > [000022] VCC_PHONE off > [000023] USART Entering Rx Mode > [000024] RST > [000025] computed Fi(1) Di(1) ratio: 372 > [000026] MODE: SNIFFER > > [000027] RST > [000028] computed Fi(1) Di(1) ratio: 372 > [000029] main(76): entering main (idle) loop > [00002A] Heart beat 00000000 > [00002B] Heart beat 00000001 > [00002C] Heart beat 00000002 > [00002D] Heart beat 00000003 > [00002E] Heart beat 00000004 > [00002F] Heart beat 00000005 And I could even get some packet trace from my Galaxy SIII (i9300): > GSM SIM 80 3 9f : 00d2 > GSM SIM 67 ISO/IEC 7816-4 SELECT File MF > GSM SIM 67 ISO/IEC 7816-4 SELECT /EF.ELP > GSM SIM 90 ISO/IEC 7816-4 GET RESPONSE > GSM SIM 75 ISO/IEC 7816-4 READ BINARY Offset=0 > GSM SIM 67 ISO/IEC 7816-4 SELECT File EF.ICCID > GSM SIM 90 ISO/IEC 7816-4 GET RESPONSE > GSM SIM 75 ISO/IEC 7816-4 READ BINARY Offset=0 > GSM SIM 85 ETSI TS 102.221 TERMINAL PROFILE > GSM SIM 67 ISO/IEC 7816-4 SELECT File EF.DIR > GSM SIM 93 ISO/IEC 7816-4 GET RESPONSE > GSM SIM 103 ISO/IEC 7816-4 READ RECORD RecordNr=1 > GSM SIM 81 ISO/IEC 7816-4 SELECT Application a0000000871002ff33ff018900000100 > GSM SIM 108 ISO/IEC 7816-4 GET RESPONSE > GSM SIM 67 ISO/IEC 7816-4 SELECT File MF Denis.
6 years, 6 months
1
0
0
0
← Newer
1
Older →
Jump to page:
1
Results per page:
10
25
50
100
200