Running kernel COFF from the command line?

Discussion about writing software for VS1005 and the VSOS Operating System. Also posts about VS1005-related hardware design and device drivers should be posted here.
Post Reply
samhathaway
User
Posts: 4
Joined: Tue 2017-07-25 17:16

Running kernel COFF from the command line?

Post by samhathaway » Tue 2017-07-25 18:17

Hi all,

So, any tips for how to run a COFF on the VS1005 from the command line? I don't really understand all the switches to vs3emu and the script format seems to be undocumented, so any help would be appreciated.

I'm trying to run a lightly modified VSOS3 kernel for hardware testing during production. I don't want to modify either flash (we are getting VS1005g chips with a suitable kernel already burned in). I just need to write the COFF to RAM and run it. I can do this using the Debug->Run option ins VSIDE, but we need this to be scriptable so we can make it idiot-proof. I've been playing around with vs3emu, using runvsos.sh as a starting point, but no matter what I do vs3emu just seems to hang. Here's what I've got:

test.script:

Code: Select all

y:0xfc02 = 0x2000
y:0xfc03 = 0
y:0xfc04 = 0
y:0xfc05 = 0
load Emulation-Debug/VSOS_Kernel.coff
g 0x80
e
test.bat:

Code: Select all

@echo off
set vsidebin="C:\Program Files (x86)\VSIDE\bin"
%vsidebin%\vs3emu -p 3 -chip vs1005 -s 115200 -m mem_desc_debug_all.mem -c test.script
test.bat output:

Code: Select all

VSEMU 2.2 Nov 12 2010 16:48:42(c)1995-2010 VLSI Solution Oy
Using serial port 3, COM speed 115200
VS1005 debug active
^C
(I have to Ctrl-C to get out.)

I suppose I could write my own tool per VS10xx VS3EMU UART interface documented, but I don't really have time for that. (This is a rush job.)

Thanks in advance!

User avatar
Panu
VLSI Staff
Posts: 2418
Joined: Tue 2010-06-22 13:43

Re: Running kernel COFF from the command line?

Post by Panu » Wed 2017-07-26 22:17

Hi!

I think you're close but I think chiptype -chip vs1005 is not the correct chiptype to use - I think that's some special chiptype we've used with some vs1005 chip earlier than vs1005g. And you'll need -monaddr 0x8000 because the default is 0x4000. Maybe test with chiptype vs1005g or vs1000 or even vs1002b.

-Panu
Info: Line In and Line Out, VS1000 User interface, Overlay howto, Latest VSIDE, MCU Howto, Youtube
Panu-Kristian Poiksalo, VLSI Solution Oy

samhathaway
User
Posts: 4
Joined: Tue 2017-07-25 17:16

Re: Running kernel COFF from the command line?

Post by samhathaway » Thu 2017-07-27 15:44

Panu,

Thanks for your reply! vs1005g and vs1002d both give No such core type errors, but vs1000 is accepted. With that and -monaddr 0x8000 I'm definitely getting further. It parses the COFF file and writes a bunch of bytes to the chip, but at the end it seems to just reset and run what's in the internal flash rather than running the code it just wrote to the board. By contrast, when using Debug>Run in VSIDE, it runs the code it just pushed. Maybe my test.script needs to be modified?

test.script:

Code: Select all

y:0xfc02 = 0x2000
y:0xfc03 = 0
y:0xfc04 = 0
y:0xfc05 = 0
load Emulation-Debug/VSOS_Kernel.coff
g 0x80
e
test.bat:

Code: Select all

@echo off
set vsidebin="C:\Program Files (x86)\VSIDE\bin"
%vsidebin%\vs3emu -p 3 -s 115200 ^
-chip vs1000 -monaddr 0x8000 ^
-m mem_desc_debug_all.mem ^
-c test.script
test.bat output:

Code: Select all

VSEMU 2.2 Nov 12 2010 16:48:42(c)1995-2010 VLSI Solution Oy
Using serial port 3, COM speed 115200
Waiting for a connection to the board...

Caused interrupt
Chip version "1005"
Stack pointer 0x3e0, bpTable 0x92e8
User program entry address 0x9128
Emulation-Debug/VSOS_Kernel.coff: includes optional header, 283 sections, 4103 symbols
Section 1: startup     page:0 start:128 size:9 relocs:4 fixed
Section 2: DelayL      page:0 start:137 size:24 relocs:2
Section 3: WritePCL    page:0 start:161 size:67 relocs:4
Section 4: DefaultSetPower  page:0 start:228 size:27 relocs:6
Section 5: ResetSdCard  page:0 start:255 size:48 relocs:10
Section 6: SetPWMLevel  page:0 start:303 size:13 relocs:0
Section 7: InitBoard   page:0 start:316 size:42 relocs:4
Section 8: powerdevboardinit_x  page:1 start:2296 size:1 relocs:0
Section 9: DefaultSysError  page:0 start:358 size:35 relocs:7
Section 10: DefaultSysReport  page:0 start:393 size:28 relocs:5
Section 11: DevNullWrite  page:0 start:421 size:43 relocs:9
Section 12: MyDelayHook  page:0 start:464 size:14 relocs:1
Section 13: SetNextApp  page:0 start:478 size:47 relocs:12
Section 14: Timer1Interrupt  page:0 start:525 size:42 relocs:7
Section 15: int_Timer1Interrupt  page:0 start:47 size:1 relocs:1 fixed
Section 16: Init0       page:0 start:567 size:132 relocs:31
Section 17: StartTask   page:0 start:699 size:63 relocs:7
Section 18: PrintTasks  page:0 start:28672 size:90 relocs:14
Section 19: PrintInt    page:0 start:28762 size:86 relocs:13
Section 20: LoadDrivers  page:0 start:762 size:220 relocs:54
Section 21: main        page:0 start:1024 size:298 relocs:85
Section 22: maininit_x  page:1 start:2304 size:76 relocs:5
Section 23: mainconst_x  page:1 start:2380 size:603 relocs:32
Section 24: NullFileIdentify  page:0 start:982 size:2 relocs:1
Section 25: Identify    page:0 start:1322 size:66 relocs:16
Section 26: FreeBuffer  page:0 start:1388 size:45 relocs:9
Section 27: GetBuffer   page:0 start:1433 size:128 relocs:31
Section 28: MakeFileDescriptor  page:0 start:1561 size:187 relocs:41
Section 29: ioctl       page:0 start:1748 size:58 relocs:11
Section 30: vo_fgetc    page:0 start:1806 size:60 relocs:8
Section 31: vo_fgets    page:0 start:1866 size:48 relocs:7
Section 32: vo_ftell    page:0 start:1914 size:23 relocs:1
Section 33: vo_fseek    page:0 start:1937 size:78 relocs:12
Section 34: vo_fputc    page:0 start:2015 size:37 relocs:3
Section 35: vo_fputs    page:0 start:2052 size:29 relocs:4
Section 36: vo_puts     page:0 start:2081 size:28 relocs:7
Section 37: vo_ungetc   page:0 start:2109 size:25 relocs:2
Section 38: vo_fread    page:0 start:2134 size:79 relocs:13
Section 39: vo_fwrite   page:0 start:2213 size:44 relocs:4
Section 40: StartFileSystem  page:0 start:2257 size:67 relocs:14
Section 41: vo_fopen    page:0 start:2324 size:255 relocs:62
Section 42: vo_fclose   page:0 start:2579 size:90 relocs:24
Section 43: vo_kernel_init  page:0 start:2669 size:45 relocs:16
Section 44: vo_feof     page:0 start:2714 size:12 relocs:0
Section 45: vo_ferror   page:0 start:2726 size:12 relocs:0
Section 46: CommonOkResultFunction  page:0 start:984 size:3 relocs:0
Section 47: AutoVoidNull  page:0 start:987 size:2 relocs:0
Section 48: CommonErrorResultFunction  page:0 start:989 size:3 relocs:0
Section 49: BusyWait    page:0 start:2738 size:21 relocs:2
Section 50: vo_fflush   page:0 start:2759 size:51 relocs:5
Section 51: RemovedInterface  page:0 start:2810 size:8 relocs:3
Section 52: BiosService  page:0 start:2818 size:3 relocs:0
Section 53: vs3emubreak  page:0 start:2821 size:2 relocs:0
Section 54: ZeroPtrCall  page:0 start:2823 size:71 relocs:23
Section 55: vsosbss_x   page:1 start:2983 size:336 relocs:0
Section 56: vsosconst_x  page:1 start:3319 size:366 relocs:7
Section 57: FatImageWriteBytes  page:0 start:2894 size:160 relocs:20
Section 58: FatFlush    page:0 start:3054 size:55 relocs:4
Section 59: FatImageSectorRead  page:0 start:3109 size:79 relocs:7
Section 60: MegaFatGetByte  page:0 start:3188 size:20 relocs:2
Section 61: MegaFatGetWord  page:0 start:3208 size:17 relocs:2
Section 62: MegaFatGetLong  page:0 start:3225 size:19 relocs:2
Section 63: FatCreate   page:0 start:3244 size:304 relocs:34
Section 64: FatGetFragmentFromFAT  page:0 start:3548 size:137 relocs:11
Section 65: VoFatClusterPos  page:0 start:3685 size:77 relocs:6
Section 66: VoFatReadClusterRecord  page:0 start:3762 size:150 relocs:23
Section 67: VoFatWriteClusterRecord  page:0 start:3912 size:185 relocs:21
Section 68: VoFatGetFreeFragment  page:0 start:4097 size:112 relocs:13
Section 69: WriteClusterChain  page:0 start:4209 size:88 relocs:12
Section 70: VoFatFindSector  page:0 start:4297 size:53 relocs:4
Section 71: VoFatWriteFile  page:0 start:4350 size:139 relocs:12
Section 72: VoFatCloseFile  page:0 start:4489 size:161 relocs:8
Section 73: VoFatReadFile  page:0 start:4650 size:137 relocs:16
Section 74: FatNameFromDirEntry  page:0 start:4787 size:66 relocs:4
Section 75: FatOpenEntry  page:0 start:4853 size:99 relocs:7
Section 76: FatExtendDirectory  page:0 start:4952 size:94 relocs:12
Section 77: FatMakeEntry  page:0 start:5046 size:195 relocs:14
Section 78: FileNameCompare  page:0 start:5241 size:77 relocs:19
Section 79: FatFindFile  page:0 start:5318 size:717 relocs:116
Section 80: FatFindFirst  page:0 start:6035 size:41 relocs:6
Section 81: FatFindNext  page:0 start:6076 size:41 relocs:7
Section 82: VoFatOpenFile  page:0 start:6117 size:76 relocs:17
Section 83: IdentifyFat  page:0 start:6193 size:96 relocs:19
Section 84: vofatconst_x  page:1 start:3685 size:136 relocs:8
Section 85: vofatbss_x  page:1 start:3821 size:165 relocs:0
Section 86: vo_fprintf  page:0 start:6289 size:18 relocs:2
Section 87: vo_printf   page:0 start:6307 size:30 relocs:7
Section 88: GetI6       page:0 start:6337 size:6 relocs:0
Section 89: ZeroPtrCall$0  page:0 start:0 size:2 relocs:1 fixed
Section 90: kernelVectors  page:0 start:32710 size:58 relocs:58 fixed
Section 91: biosVectors  page:0 start:124 size:4 relocs:4 fixed
Section 92: os_if_vars  page:1 start:2160 size:136 relocs:9 fixed
Section 93: data_y      page:2 start:1238 size:6 relocs:0
Section 94: CodMpgDecodePatch  page:0 start:6343 size:90 relocs:13
Section 95: const_cos12_y  page:2 start:1202 size:36 relocs:0 fixed
Section 96: mp3asm_const_x  page:1 start:0 size:0 relocs:0
Section 97: KernelCodMpgCreate  page:0 start:6433 size:16 relocs:3
Section 98: TimeCountAndScheduleHandler  page:0 start:6449 size:17 relocs:2
Section 99: GpioReadInputPin  page:0 start:6466 size:28 relocs:2
Section 100: GpioReadPinDelay  page:0 start:6494 size:81 relocs:9
Section 101: GpioSetPin  page:0 start:6575 size:48 relocs:5
Section 102: GpioSetAsInput  page:0 start:6623 size:39 relocs:3
Section 103: GpioSetAsPeripheral  page:0 start:6662 size:35 relocs:3
Section 104: vogpioconst_x  page:1 start:2297 size:3 relocs:0
Section 105: DelayMicroSecPatch  page:0 start:6697 size:27 relocs:2
Section 106: InitHwLocks  page:0 start:6724 size:11 relocs:2
Section 107: QueueHwLock  page:0 start:6735 size:57 relocs:11
Section 108: ObtainHwLocksBIP  page:0 start:6792 size:93 relocs:18
Section 109: AttemptHwLocksBIP  page:0 start:6885 size:51 relocs:7
Section 110: ReleaseHwLock  page:0 start:6936 size:94 relocs:19
Section 111: ReleaseHwLocksBIP  page:0 start:7030 size:71 relocs:12
Section 112: hwLocksbss_x  page:1 start:3986 size:80 relocs:0
Section 113: hwLocksconst_y  page:2 start:1244 size:7 relocs:0
Section 114: XPeripIntC  page:0 start:7101 size:17 relocs:2
Section 115: xPeripconst_x  page:1 start:4066 size:14 relocs:14
Section 116: XPeripIntAsm  page:0 start:7118 size:50 relocs:5
Section 117: XP_FifoRd8  page:0 start:7168 size:20 relocs:2
Section 118: XP_FifoWr8  page:0 start:7188 size:20 relocs:2
Section 119: MSBSetU32   page:0 start:7208 size:8 relocs:0
Section 120: StdButtonDefaultRender  page:0 start:7216 size:49 relocs:11
Section 121: RenderStdButton  page:0 start:7265 size:18 relocs:1
Section 122: CreateStdButton  page:0 start:7283 size:7 relocs:1
Section 123: GetStdButtonPress  page:0 start:7290 size:3 relocs:0
Section 124: SetClippingRectangleToButton  page:0 start:7293 size:2 relocs:0
Section 125: stdbuttonsDumbinit_x  page:1 start:2300 size:3 relocs:0
Section 126: stdbuttonsDumbconst_x  page:1 start:4080 size:14 relocs:0
Section 127: ConsoleIoctl  page:0 start:7295 size:21 relocs:3
Section 128: consoleopsconst_x  page:1 start:4094 size:20 relocs:0
Section 129: NextResource  page:0 start:7316 size:67 relocs:13
Section 130: ResGet16    page:0 start:7383 size:15 relocs:1
Section 131: ResGet32    page:0 start:7398 size:17 relocs:1
Section 132: RemoveLibFromList  page:0 start:7415 size:56 relocs:8
Section 133: CallToDroppedLibrary  page:0 start:7471 size:23 relocs:5
Section 134: DropLibrary  page:0 start:7494 size:113 relocs:20
Section 135: LoadLibraryP  page:0 start:7607 size:81 relocs:24
Section 136: LoadLibrary  page:0 start:7688 size:14 relocs:2
Section 137: RunLibraryFunction  page:0 start:7702 size:46 relocs:6
Section 138: VOGetSymbolAddress  page:0 start:7748 size:29 relocs:4
Section 139: DisableIntVector  page:0 start:7777 size:29 relocs:1
Section 140: LoadLibraryFile  page:0 start:7806 size:685 relocs:162
Section 141: RunAppFile3  page:0 start:8491 size:39 relocs:5
Section 142: apploaderbss_x  page:1 start:4114 size:26 relocs:0
Section 143: apploaderconst_x  page:1 start:4140 size:211 relocs:1
Section 144: apploaderbss_y  page:2 start:1280 size:20 relocs:0
Section 145: apploaderinit_x  page:1 start:4351 size:3 relocs:0
Section 146: apploaderinit_y  page:2 start:1251 size:1 relocs:0
Section 147: WriteToProgramRam  page:0 start:8530 size:5 relocs:0
Section 148: ReadFromProgramRam  page:0 start:8535 size:4 relocs:0
Section 149: AudioIoctl  page:0 start:8539 size:79 relocs:15
Section 150: AudioWrite  page:0 start:8618 size:45 relocs:7
Section 151: voaudioconst_x  page:1 start:4354 size:12 relocs:6
Section 152: voaudioinit_x  page:1 start:2303 size:1 relocs:0
Section 153: GetMemory   page:0 start:8663 size:160 relocs:39
Section 154: getmemoryinit_x  page:1 start:4366 size:1 relocs:0
Section 155: getmemoryconst_x  page:1 start:4367 size:54 relocs:0
Section 156: SetHandler  page:0 start:8823 size:13 relocs:0
Section 157: BusyDelay4x  page:0 start:8836 size:6 relocs:1
Section 158: SetUartSpeed  page:0 start:8842 size:50 relocs:5
Section 159: DevHwSpiIdentify  page:0 start:8892 size:4 relocs:1
Section 160: DevHwSpiCreate  page:0 start:28848 size:142 relocs:13
Section 161: DevHwSpiDelete  page:0 start:8896 size:35 relocs:3
Section 162: DevHwSpiRead  page:0 start:8931 size:133 relocs:17
Section 163: DevHwSpiWrite  page:0 start:9064 size:130 relocs:19
Section 164: DevHwSpiIoctl  page:0 start:9194 size:167 relocs:24
Section 165: devHwSpiconst_x  page:1 start:4421 size:51 relocs:8
Section 166: devHwSpiinit_x  page:1 start:4472 size:1 relocs:1
Section 167: ScsiState2  page:0 start:28990 size:7 relocs:1
Section 168: MyUSBResetEndpoint  page:0 start:28997 size:27 relocs:2
Section 169: MyUSBReadLines  page:0 start:29024 size:19 relocs:2
Section 170: MyUSBWantsSuspend  page:0 start:29043 size:15 relocs:2
Section 171: MyUSBResetStall  page:0 start:29058 size:21 relocs:2
Section 172: MyResetBulkEndpoints  page:0 start:29079 size:24 relocs:1
Section 173: USBIsEndpointStalled2  page:0 start:29103 size:20 relocs:2
Section 174: MyUSBIsDetached  page:0 start:29123 size:18 relocs:3
Section 175: MyUSBSendZeroLengthPacketToEndpoint0  page:0 start:29141 size:47 relocs:6
Section 176: USBContinueTransmission2  page:0 start:29188 size:155 relocs:27
Section 177: USBStartTransmission2  page:0 start:29343 size:85 relocs:11
Section 178: USBSingleStallEndpoint2  page:0 start:29428 size:41 relocs:4
Section 179: MyUSBStallEndpoint  page:0 start:29469 size:22 relocs:2
Section 180: RealDecodeSetupPacket2  page:0 start:29491 size:381 relocs:73
Section 181: MyUSBReceivePacket  page:0 start:29872 size:61 relocs:4
Section 182: MyInitUSB   page:0 start:29933 size:108 relocs:9
Section 183: MyUSBHandler  page:0 start:30041 size:164 relocs:36
Section 184: MyScsiTaskHandler  page:0 start:30205 size:130 relocs:33
Section 185: ScsiLbab    page:0 start:30335 size:19 relocs:0
Section 186: ScsiInquiry  page:0 start:30354 size:101 relocs:15
Section 187: DiskDataReceived  page:0 start:30455 size:91 relocs:18
Section 188: DiskProtocolCommand  page:0 start:30546 size:325 relocs:97
Section 189: MyScsiReset  page:0 start:30871 size:39 relocs:6
Section 190: MyMSCPacketFromPC  page:0 start:30910 size:72 relocs:14
Section 191: MscSendCsw  page:0 start:30982 size:57 relocs:11
Section 192: scsibss_x   page:1 start:4473 size:59 relocs:0
Section 193: scsiinit_x  page:1 start:4532 size:4 relocs:1
Section 194: scsiinit_y  page:2 start:1300 size:4 relocs:0
Section 195: scsiconst_x  page:1 start:4536 size:6 relocs:0
Section 196: OkResultFunction  page:0 start:9361 size:3 relocs:0
Section 197: UsbMapCreate  page:0 start:31039 size:2 relocs:1
Section 198: UsbMapRead  page:0 start:31041 size:32 relocs:2
Section 199: UsbMapWrite  page:0 start:31073 size:50 relocs:4
Section 200: UsbMapFlush  page:0 start:31123 size:28 relocs:2
Section 201: MyInitUSBDescriptors  page:0 start:31151 size:36 relocs:8
Section 202: PowerSetVoltages2  page:0 start:9364 size:36 relocs:0
Section 203: VoMassStorage  page:0 start:31187 size:161 relocs:35
Section 204: mscinit_x   page:1 start:4542 size:30 relocs:5
Section 205: mscbss_x    page:1 start:28672 size:261 relocs:0
Section 206: mscconst_x  page:1 start:4572 size:109 relocs:0
Section 207: PinToGpioHwLockMask  page:0 start:9400 size:27 relocs:4
Section 208: hwLockPinMaskconst_y  page:2 start:1304 size:23 relocs:0
Section 209: InitMutexN  page:0 start:9427 size:3 relocs:0
Section 210: ObtainMutex  page:0 start:9430 size:26 relocs:4
Section 211: AttemptMutex  page:0 start:9456 size:15 relocs:4
Section 212: ReleaseMutex  page:0 start:9471 size:11 relocs:2
Section 213: ConsoleWrite  page:0 start:9482 size:31 relocs:5
Section 214: consoleconst_x  page:1 start:4681 size:12 relocs:4
Section 215: DevSpiFlashCreate  page:0 start:31348 size:53 relocs:6
Section 216: DevSpiFlashDelete  page:0 start:9513 size:3 relocs:0
Section 217: SingleCycleCommand  page:0 start:9516 size:42 relocs:3
Section 218: MultipleCycleCommand  page:0 start:9558 size:49 relocs:4
Section 219: SpiFlashWaitStatus  page:0 start:9607 size:57 relocs:5
Section 220: GetREMS     page:0 start:9664 size:43 relocs:4
Section 221: FlashUnprotect  page:0 start:9707 size:33 relocs:5
Section 222: DevSpiFlashIdentify  page:0 start:9740 size:17 relocs:5
Section 223: PrintCache  page:0 start:9757 size:20 relocs:2
Section 224: IsInCache   page:0 start:9777 size:40 relocs:6
Section 225: Erase4K     page:0 start:9817 size:45 relocs:5
Section 226: ProgramSector  page:0 start:9862 size:91 relocs:10
Section 227: Flush4K2    page:0 start:9953 size:65 relocs:10
Section 228: CacheCheck  page:0 start:10018 size:70 relocs:9
Section 229: BlockRead   page:0 start:10088 size:50 relocs:3
Section 230: FFlush      page:0 start:10138 size:62 relocs:11
Section 231: PutCacheBlock  page:0 start:10240 size:54 relocs:8
Section 232: DevSpiFlashBlockRead  page:0 start:10294 size:48 relocs:6
Section 233: DevSpiFlashBlockWrite  page:0 start:10342 size:41 relocs:4
Section 234: DevSpiFlashIoctl  page:0 start:10383 size:54 relocs:8
Section 235: devSpiFlashbss_x  page:1 start:4693 size:2079 relocs:0
Section 236: devSpiFlashinit_x  page:1 start:6772 size:2 relocs:0
Section 237: devSpiFlashconst_y  page:2 start:1327 size:33 relocs:6
Section 238: devSpiFlashconst_x  page:1 start:6774 size:22 relocs:0
Section 239: ListDevices  page:0 start:10437 size:81 relocs:14
Section 240: StartOS3    page:0 start:10518 size:61 relocs:21
Section 241: AllocMemYPatch  page:0 start:10200 size:21 relocs:4
Section 242: ApplyGFixes  page:0 start:10579 size:49 relocs:9
Section 243: vsosvsgconst_x  page:1 start:6796 size:206 relocs:0
Section 244: vsosvsgbss_x  page:1 start:7002 size:66 relocs:0
Section 245: intOSgfix   page:0 start:10221 size:18 relocs:0
Section 246: SetStdAudioOutVolume  page:0 start:10628 size:14 relocs:3
Section 247: SystemUiMessageCyclic  page:0 start:10642 size:70 relocs:13
Section 248: SystemUiMessageReceiver  page:0 start:10712 size:79 relocs:23
Section 249: sysuimsginit_x  page:1 start:7068 size:13 relocs:1
Section 250: sysuimsginit_y  page:2 start:1360 size:16 relocs:0
Section 251: SymbolCalcCrc32String  page:0 start:10791 size:32 relocs:3
Section 252: SymbolCrunchStringCalcCrc32  page:0 start:10823 size:61 relocs:6
Section 253: SymbolAdd   page:0 start:10884 size:68 relocs:12
Section 254: SymbolFindByCrc  page:0 start:10952 size:36 relocs:5
Section 255: SymbolDelete  page:0 start:10988 size:97 relocs:19
Section 256: SymbolDeleteLib  page:0 start:11085 size:30 relocs:5
Section 257: extSymbolsinit_y  page:2 start:1376 size:1025 relocs:0
Section 258: extSymbolsconst_y  page:2 start:2401 size:576 relocs:0
Section 259: TransientAddKernelSymbols  page:0 start:31401 size:73 relocs:48
Section 260: transientconst_x  page:1 start:28933 size:190 relocs:0
Section 261: CyclicMainLoop  page:0 start:11115 size:119 relocs:24
Section 262: CreateCyclic  page:0 start:31474 size:26 relocs:10
Section 263: SetInCyclicQueue  page:0 start:11234 size:44 relocs:13
Section 264: AddCyclic   page:0 start:11278 size:24 relocs:5
Section 265: DropCyclic  page:0 start:11302 size:31 relocs:10
Section 266: cyclicinit_x  page:1 start:7081 size:7 relocs:0
Section 267: cyclicconst_x  page:1 start:7088 size:7 relocs:0
Section 268: CreateTaskAndStack  page:0 start:31500 size:64 relocs:10
Section 269: strncasecmp  page:0 start:11333 size:38 relocs:7
Section 270: atoi        page:0 start:11371 size:64 relocs:10
Section 271: AddTimer    page:0 start:11435 size:15 relocs:2
Section 272: RemoveTimer  page:0 start:11450 size:14 relocs:1
Section 273: InitTimer   page:0 start:11464 size:31 relocs:0
Section 274: StartTimer  page:0 start:11495 size:15 relocs:0
Section 275: StopTimer   page:0 start:11510 size:14 relocs:0
Section 276: Delay       page:0 start:11524 size:45 relocs:8
Section 277: __InitMemAllocI  page:0 start:11569 size:27 relocs:6
Section 278: __AllocMemI  page:0 start:11596 size:87 relocs:24
Section 279: __AllocMemAbsI  page:0 start:11683 size:105 relocs:23
Section 280: __FreeMemI  page:0 start:11788 size:192 relocs:58
Section 281: bss_x       page:1 start:7095 size:1 relocs:0
Section 282: CreateTask  page:0 start:11980 size:60 relocs:5
Section 283: listsi      page:0 start:12040 size:184 relocs:1
  A2  : 0x0a  A1  : 0x6f2e  A0  : 0x2030
  B2  : 0x2e  B1  : 0x0a56  B0  : 0x393a
  C2  : 0x4c  C1  : 0x534f  C0  : 0x3035
  D2  : 0x33  D1  : 0x5320  D0  : 0x3a33
  LR0 : 0x4865  LR1 : 0x6c6c  MR0 : 0x3230  MR1 : 0x3137
  LC  : 0x2032  LS  : 0x6e20  LE  : 0x3520
  I0  : 0x5349  I1  : 0x2062  I2  : 0x2053  I3  : 0x7569
  I4  : 0x6f6c  I5  : 0x6c64  I6  : 0x7574  I7  : 0x204a
  P   : 0x00756c696f =~ 1970039151
  A   : 0x006f2e203a =~ 1865293882
  B   : 0x000a56393e =~ 173422910
  C   : 0x00534f307d =~ 1397698685
  D   : 0x0053203a33 =~ 1394620979
  PC  : 0x00000000
Next Exec: 0x0000 MV LR0,I1
Task "?trigtekre.?trigDvcs. Etra P ls?Isaldsse eie:S P ls 84 ade yF", n/a, PC 0x00000000, Pri 12598, SigWait/Recvd 0x7777/0x2e76
    Stack 0x6c73 Size 0x692e SP 0x6669
section "ZeroPtrCall$0"
_resx + 0x000000
So: is there something I can change to make it run the code it just sent rather than reset the chip? And, is the "script" format documented anywhere?

Thanks!
-sam

User avatar
pasi
VLSI Staff
Posts: 1412
Joined: Thu 2010-07-15 16:04

Re: Running kernel COFF from the command line?

Post by pasi » Thu 2017-07-27 15:54

"-chip vs1005" should be correct for vs1005. (There's also "vs1005fpga" which is incorrect.)

It seems the only difference to "-chip vs1000 -monaddr 0x8000" is that the serial port speed adjustment (-ts) would not work.

If there is already an OS loaded with interrupt sources enabled, a crash could be caused by that. Disabling interrupt sources might work. (I'm not sure if vs3emu writes to INT_ENABLE registers automatically.)
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

samhathaway
User
Posts: 4
Joined: Tue 2017-07-25 17:16

Re: Running kernel COFF from the command line?

Post by samhathaway » Thu 2017-07-27 16:58

I don't think a crash is happening with -chip vs1005 since INIT.AP3 continues to run. With -chip vs1005 -monaddr 0x8000 I get the same thing I was getting originally:

Code: Select all

VSEMU 2.2 Nov 12 2010 16:48:42(c)1995-2010 VLSI Solution Oy
Using serial port 3, COM speed 115200
VS1005 debug active
^C
(I have to Ctrl-C to get out, and the device behaves as if nothing has happened.)

So it looks like -chip vs1000 -monaddr 0x8000 is my best bet for now. Are you saying that the chip is crashing after vs3emu writes the COFF to RAM? How can I turn off interrupts from vs3emu? Why is VSIDE able to do this but vs3emu not?

Thanks for all your help!
-sam

User avatar
Panu
VLSI Staff
Posts: 2418
Joined: Tue 2010-06-22 13:43

Re: Running kernel COFF from the command line?

Post by Panu » Fri 2017-07-28 21:17

Hmm, I may have asked Lasse to do some small tweaks to the emu connect in VSIDE to improve connection reliability... such as disabling the power button reset and I think also some interrupts...

But let's continue with one possibility.. in the latest VSOS root, there is a program called VS3EMUC which prepares the chip for VS3EMU connection; it revectors all interrupts to their original ROM handlers. Can you see if running that program before the script helps?

If you want to run it from the main menu, rename it to VS3EMUC.AP3 and place it in the flash root.

-Panu
Attachments
vs3emuc.dl3
Program to reset the VS1005g to accept VS3EMU connection. Source code is in the latest root source code zip.
(1.08 KiB) Downloaded 7 times
Info: Line In and Line Out, VS1000 User interface, Overlay howto, Latest VSIDE, MCU Howto, Youtube
Panu-Kristian Poiksalo, VLSI Solution Oy

samhathaway
User
Posts: 4
Joined: Tue 2017-07-25 17:16

Re: Running kernel COFF from the command line?

Post by samhathaway » Fri 2017-07-28 23:25

Hi Panu,

Will try, but for now, I was able to get vs3emu talking to my board mostly reliably. Not sure what changed besides using the switches you recommended and making sure the hw_desc file was available. I'm sorry I don't have more information. Thanks for your help!
-sam

Post Reply

Who is online

Users browsing this forum: Baidu [Spider]