working demo
This commit is contained in:
286
.metadata/.log
286
.metadata/.log
@@ -2244,3 +2244,289 @@ java.lang.Exception: Error erasing flash with vFlashErase packet
|
|||||||
|
|
||||||
!ENTRY org.eclipse.cdt.core 1 0 2019-10-01 15:49:10.425
|
!ENTRY org.eclipse.cdt.core 1 0 2019-10-01 15:49:10.425
|
||||||
!MESSAGE Indexed 'lab3subroutines' (1 sources, 33 headers) in 0.605 sec: 1,056 declarations; 1,872 references; 0 unresolved inclusions; 0 syntax errors; 0 unresolved names (0%)
|
!MESSAGE Indexed 'lab3subroutines' (1 sources, 33 headers) in 0.605 sec: 1,056 declarations; 1,872 references; 0 unresolved inclusions; 0 syntax errors; 0 unresolved names (0%)
|
||||||
|
|
||||||
|
!ENTRY fr.ac6.mcu.debug 4 5012 2019-10-07 20:40:59.143
|
||||||
|
!MESSAGE Error in final launch sequence
|
||||||
|
!STACK 1
|
||||||
|
org.eclipse.core.runtime.CoreException: Failed to execute MI command:
|
||||||
|
-target-select remote localhost:3333
|
||||||
|
|
||||||
|
Error message from debugger back end:
|
||||||
|
Remote communication error. Target disconnected.: No error.
|
||||||
|
at org.eclipse.cdt.dsf.concurrent.Query.get(Query.java:111)
|
||||||
|
at fr.ac6.mcu.debug.launching.MCUGDBJtagDSFLaunchConfigurationDelegate.launchDebugSession(MCUGDBJtagDSFLaunchConfigurationDelegate.java:248)
|
||||||
|
at org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate.launchDebugger(GdbLaunchDelegate.java:101)
|
||||||
|
at org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate.launch(GdbLaunchDelegate.java:90)
|
||||||
|
at fr.ac6.mcu.debug.launching.MCUGDBJtagDSFLaunchConfigurationDelegate.launch(MCUGDBJtagDSFLaunchConfigurationDelegate.java:306)
|
||||||
|
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:885)
|
||||||
|
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:739)
|
||||||
|
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1039)
|
||||||
|
at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1256)
|
||||||
|
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
|
||||||
|
Caused by: java.lang.Exception: Remote communication error. Target disconnected.: No error.
|
||||||
|
at org.eclipse.cdt.dsf.mi.service.command.AbstractMIControl$RxThread.processMIOutput(AbstractMIControl.java:941)
|
||||||
|
at org.eclipse.cdt.dsf.mi.service.command.AbstractMIControl$RxThread.run(AbstractMIControl.java:770)
|
||||||
|
!SUBENTRY 1 org.eclipse.cdt.dsf.gdb 4 10004 2019-10-07 20:40:59.144
|
||||||
|
!MESSAGE Failed to execute MI command:
|
||||||
|
-target-select remote localhost:3333
|
||||||
|
|
||||||
|
Error message from debugger back end:
|
||||||
|
Remote communication error. Target disconnected.: No error.
|
||||||
|
!STACK 0
|
||||||
|
java.lang.Exception: Remote communication error. Target disconnected.: No error.
|
||||||
|
at org.eclipse.cdt.dsf.mi.service.command.AbstractMIControl$RxThread.processMIOutput(AbstractMIControl.java:941)
|
||||||
|
at org.eclipse.cdt.dsf.mi.service.command.AbstractMIControl$RxThread.run(AbstractMIControl.java:770)
|
||||||
|
|
||||||
|
!ENTRY fr.ac6.mcu.debug 4 5012 2019-10-07 20:40:59.202
|
||||||
|
!MESSAGE Error in final launch sequence
|
||||||
|
!STACK 1
|
||||||
|
org.eclipse.core.runtime.CoreException: Failed to execute MI command:
|
||||||
|
load C:\\Users\\barnestr\\Documents\\CE2801\\workspace\\lab3subroutines\\Debug\\lab3subroutines.elf
|
||||||
|
|
||||||
|
Error message from debugger back end:
|
||||||
|
Remote communication error. Target disconnected.: No error.
|
||||||
|
at org.eclipse.cdt.dsf.concurrent.Query.get(Query.java:111)
|
||||||
|
at fr.ac6.mcu.debug.launching.MCUGDBJtagDSFLaunchConfigurationDelegate.launchDebugSession(MCUGDBJtagDSFLaunchConfigurationDelegate.java:248)
|
||||||
|
at org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate.launchDebugger(GdbLaunchDelegate.java:101)
|
||||||
|
at org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate.launch(GdbLaunchDelegate.java:90)
|
||||||
|
at fr.ac6.mcu.debug.launching.MCUGDBJtagDSFLaunchConfigurationDelegate.launch(MCUGDBJtagDSFLaunchConfigurationDelegate.java:306)
|
||||||
|
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:885)
|
||||||
|
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:739)
|
||||||
|
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1039)
|
||||||
|
at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1256)
|
||||||
|
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
|
||||||
|
Caused by: java.lang.Exception: Remote communication error. Target disconnected.: No error.
|
||||||
|
at org.eclipse.cdt.dsf.mi.service.command.AbstractMIControl$RxThread.processMIOutput(AbstractMIControl.java:941)
|
||||||
|
at org.eclipse.cdt.dsf.mi.service.command.AbstractMIControl$RxThread.run(AbstractMIControl.java:770)
|
||||||
|
!SUBENTRY 1 org.eclipse.cdt.dsf.gdb 4 10004 2019-10-07 20:40:59.203
|
||||||
|
!MESSAGE Failed to execute MI command:
|
||||||
|
load C:\\Users\\barnestr\\Documents\\CE2801\\workspace\\lab3subroutines\\Debug\\lab3subroutines.elf
|
||||||
|
|
||||||
|
Error message from debugger back end:
|
||||||
|
Remote communication error. Target disconnected.: No error.
|
||||||
|
!STACK 0
|
||||||
|
java.lang.Exception: Remote communication error. Target disconnected.: No error.
|
||||||
|
at org.eclipse.cdt.dsf.mi.service.command.AbstractMIControl$RxThread.processMIOutput(AbstractMIControl.java:941)
|
||||||
|
at org.eclipse.cdt.dsf.mi.service.command.AbstractMIControl$RxThread.run(AbstractMIControl.java:770)
|
||||||
|
|
||||||
|
!ENTRY fr.ac6.mcu.debug 4 5012 2019-10-07 20:56:27.036
|
||||||
|
!MESSAGE Error in final launch sequence
|
||||||
|
!STACK 1
|
||||||
|
org.eclipse.core.runtime.CoreException: Failed to execute MI command:
|
||||||
|
load C:\\Users\\barnestr\\Documents\\CE2801\\workspace\\lab3subroutines\\Debug\\lab3subroutines.elf
|
||||||
|
|
||||||
|
Error message from debugger back end:
|
||||||
|
Error erasing flash with vFlashErase packet
|
||||||
|
at org.eclipse.cdt.dsf.concurrent.Query.get(Query.java:111)
|
||||||
|
at fr.ac6.mcu.debug.launching.MCUGDBJtagDSFLaunchConfigurationDelegate.launchDebugSession(MCUGDBJtagDSFLaunchConfigurationDelegate.java:248)
|
||||||
|
at org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate.launchDebugger(GdbLaunchDelegate.java:101)
|
||||||
|
at org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate.launch(GdbLaunchDelegate.java:90)
|
||||||
|
at fr.ac6.mcu.debug.launching.MCUGDBJtagDSFLaunchConfigurationDelegate.launch(MCUGDBJtagDSFLaunchConfigurationDelegate.java:306)
|
||||||
|
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:885)
|
||||||
|
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:739)
|
||||||
|
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1039)
|
||||||
|
at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1256)
|
||||||
|
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
|
||||||
|
Caused by: java.lang.Exception: Error erasing flash with vFlashErase packet
|
||||||
|
at org.eclipse.cdt.dsf.mi.service.command.AbstractMIControl$RxThread.processMIOutput(AbstractMIControl.java:941)
|
||||||
|
at org.eclipse.cdt.dsf.mi.service.command.AbstractMIControl$RxThread.run(AbstractMIControl.java:770)
|
||||||
|
!SUBENTRY 1 org.eclipse.cdt.dsf.gdb 4 10004 2019-10-07 20:56:27.037
|
||||||
|
!MESSAGE Failed to execute MI command:
|
||||||
|
load C:\\Users\\barnestr\\Documents\\CE2801\\workspace\\lab3subroutines\\Debug\\lab3subroutines.elf
|
||||||
|
|
||||||
|
Error message from debugger back end:
|
||||||
|
Error erasing flash with vFlashErase packet
|
||||||
|
!STACK 0
|
||||||
|
java.lang.Exception: Error erasing flash with vFlashErase packet
|
||||||
|
at org.eclipse.cdt.dsf.mi.service.command.AbstractMIControl$RxThread.processMIOutput(AbstractMIControl.java:941)
|
||||||
|
at org.eclipse.cdt.dsf.mi.service.command.AbstractMIControl$RxThread.run(AbstractMIControl.java:770)
|
||||||
|
|
||||||
|
!ENTRY fr.ac6.mcu.debug 4 5012 2019-10-08 09:51:05.952
|
||||||
|
!MESSAGE Error in final launch sequence
|
||||||
|
!STACK 1
|
||||||
|
org.eclipse.core.runtime.CoreException: Failed to execute MI command:
|
||||||
|
load C:\\Users\\barnestr\\Documents\\CE2801\\workspace\\lab3subroutines\\Debug\\lab3subroutines.elf
|
||||||
|
|
||||||
|
Error message from debugger back end:
|
||||||
|
Error erasing flash with vFlashErase packet
|
||||||
|
at org.eclipse.cdt.dsf.concurrent.Query.get(Query.java:111)
|
||||||
|
at fr.ac6.mcu.debug.launching.MCUGDBJtagDSFLaunchConfigurationDelegate.launchDebugSession(MCUGDBJtagDSFLaunchConfigurationDelegate.java:248)
|
||||||
|
at org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate.launchDebugger(GdbLaunchDelegate.java:101)
|
||||||
|
at org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate.launch(GdbLaunchDelegate.java:90)
|
||||||
|
at fr.ac6.mcu.debug.launching.MCUGDBJtagDSFLaunchConfigurationDelegate.launch(MCUGDBJtagDSFLaunchConfigurationDelegate.java:306)
|
||||||
|
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:885)
|
||||||
|
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:739)
|
||||||
|
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1039)
|
||||||
|
at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1256)
|
||||||
|
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
|
||||||
|
Caused by: java.lang.Exception: Error erasing flash with vFlashErase packet
|
||||||
|
at org.eclipse.cdt.dsf.mi.service.command.AbstractMIControl$RxThread.processMIOutput(AbstractMIControl.java:941)
|
||||||
|
at org.eclipse.cdt.dsf.mi.service.command.AbstractMIControl$RxThread.run(AbstractMIControl.java:770)
|
||||||
|
!SUBENTRY 1 org.eclipse.cdt.dsf.gdb 4 10004 2019-10-08 09:51:05.953
|
||||||
|
!MESSAGE Failed to execute MI command:
|
||||||
|
load C:\\Users\\barnestr\\Documents\\CE2801\\workspace\\lab3subroutines\\Debug\\lab3subroutines.elf
|
||||||
|
|
||||||
|
Error message from debugger back end:
|
||||||
|
Error erasing flash with vFlashErase packet
|
||||||
|
!STACK 0
|
||||||
|
java.lang.Exception: Error erasing flash with vFlashErase packet
|
||||||
|
at org.eclipse.cdt.dsf.mi.service.command.AbstractMIControl$RxThread.processMIOutput(AbstractMIControl.java:941)
|
||||||
|
at org.eclipse.cdt.dsf.mi.service.command.AbstractMIControl$RxThread.run(AbstractMIControl.java:770)
|
||||||
|
|
||||||
|
!ENTRY fr.ac6.mcu.debug 4 5012 2019-10-08 09:51:19.847
|
||||||
|
!MESSAGE Error in final launch sequence
|
||||||
|
!STACK 1
|
||||||
|
org.eclipse.core.runtime.CoreException: Failed to execute MI command:
|
||||||
|
load C:\\Users\\barnestr\\Documents\\CE2801\\workspace\\lab3subroutines\\Debug\\lab3subroutines.elf
|
||||||
|
|
||||||
|
Error message from debugger back end:
|
||||||
|
Error erasing flash with vFlashErase packet
|
||||||
|
at org.eclipse.cdt.dsf.concurrent.Query.get(Query.java:111)
|
||||||
|
at fr.ac6.mcu.debug.launching.MCUGDBJtagDSFLaunchConfigurationDelegate.launchDebugSession(MCUGDBJtagDSFLaunchConfigurationDelegate.java:248)
|
||||||
|
at org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate.launchDebugger(GdbLaunchDelegate.java:101)
|
||||||
|
at org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate.launch(GdbLaunchDelegate.java:90)
|
||||||
|
at fr.ac6.mcu.debug.launching.MCUGDBJtagDSFLaunchConfigurationDelegate.launch(MCUGDBJtagDSFLaunchConfigurationDelegate.java:306)
|
||||||
|
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:885)
|
||||||
|
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:739)
|
||||||
|
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1039)
|
||||||
|
at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1256)
|
||||||
|
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
|
||||||
|
Caused by: java.lang.Exception: Error erasing flash with vFlashErase packet
|
||||||
|
at org.eclipse.cdt.dsf.mi.service.command.AbstractMIControl$RxThread.processMIOutput(AbstractMIControl.java:941)
|
||||||
|
at org.eclipse.cdt.dsf.mi.service.command.AbstractMIControl$RxThread.run(AbstractMIControl.java:770)
|
||||||
|
!SUBENTRY 1 org.eclipse.cdt.dsf.gdb 4 10004 2019-10-08 09:51:19.847
|
||||||
|
!MESSAGE Failed to execute MI command:
|
||||||
|
load C:\\Users\\barnestr\\Documents\\CE2801\\workspace\\lab3subroutines\\Debug\\lab3subroutines.elf
|
||||||
|
|
||||||
|
Error message from debugger back end:
|
||||||
|
Error erasing flash with vFlashErase packet
|
||||||
|
!STACK 0
|
||||||
|
java.lang.Exception: Error erasing flash with vFlashErase packet
|
||||||
|
at org.eclipse.cdt.dsf.mi.service.command.AbstractMIControl$RxThread.processMIOutput(AbstractMIControl.java:941)
|
||||||
|
at org.eclipse.cdt.dsf.mi.service.command.AbstractMIControl$RxThread.run(AbstractMIControl.java:770)
|
||||||
|
|
||||||
|
!ENTRY fr.ac6.mcu.debug 4 5012 2019-10-08 15:33:04.018
|
||||||
|
!MESSAGE Error in final launch sequence
|
||||||
|
!STACK 1
|
||||||
|
org.eclipse.core.runtime.CoreException: Failed to execute MI command:
|
||||||
|
load C:\\Users\\barnestr\\Documents\\CE2801\\workspace\\lab3subroutines\\Debug\\lab3subroutines.elf
|
||||||
|
|
||||||
|
Error message from debugger back end:
|
||||||
|
Error erasing flash with vFlashErase packet
|
||||||
|
at org.eclipse.cdt.dsf.concurrent.Query.get(Query.java:111)
|
||||||
|
at fr.ac6.mcu.debug.launching.MCUGDBJtagDSFLaunchConfigurationDelegate.launchDebugSession(MCUGDBJtagDSFLaunchConfigurationDelegate.java:248)
|
||||||
|
at org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate.launchDebugger(GdbLaunchDelegate.java:101)
|
||||||
|
at org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate.launch(GdbLaunchDelegate.java:90)
|
||||||
|
at fr.ac6.mcu.debug.launching.MCUGDBJtagDSFLaunchConfigurationDelegate.launch(MCUGDBJtagDSFLaunchConfigurationDelegate.java:306)
|
||||||
|
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:885)
|
||||||
|
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:739)
|
||||||
|
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1039)
|
||||||
|
at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1256)
|
||||||
|
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
|
||||||
|
Caused by: java.lang.Exception: Error erasing flash with vFlashErase packet
|
||||||
|
at org.eclipse.cdt.dsf.mi.service.command.AbstractMIControl$RxThread.processMIOutput(AbstractMIControl.java:941)
|
||||||
|
at org.eclipse.cdt.dsf.mi.service.command.AbstractMIControl$RxThread.run(AbstractMIControl.java:770)
|
||||||
|
!SUBENTRY 1 org.eclipse.cdt.dsf.gdb 4 10004 2019-10-08 15:33:04.019
|
||||||
|
!MESSAGE Failed to execute MI command:
|
||||||
|
load C:\\Users\\barnestr\\Documents\\CE2801\\workspace\\lab3subroutines\\Debug\\lab3subroutines.elf
|
||||||
|
|
||||||
|
Error message from debugger back end:
|
||||||
|
Error erasing flash with vFlashErase packet
|
||||||
|
!STACK 0
|
||||||
|
java.lang.Exception: Error erasing flash with vFlashErase packet
|
||||||
|
at org.eclipse.cdt.dsf.mi.service.command.AbstractMIControl$RxThread.processMIOutput(AbstractMIControl.java:941)
|
||||||
|
at org.eclipse.cdt.dsf.mi.service.command.AbstractMIControl$RxThread.run(AbstractMIControl.java:770)
|
||||||
|
|
||||||
|
!ENTRY org.eclipse.cdt.dsf 4 10005 2019-10-08 15:35:06.402
|
||||||
|
!MESSAGE Request for monitor: 'RequestMonitor (org.eclipse.cdt.dsf.debug.ui.viewmodel.SteppingController$3@308daccb): Status ERROR: org.eclipse.cdt.dsf.gdb code=10004 Failed to execute MI command:
|
||||||
|
-exec-next 1
|
||||||
|
Error message from debugger back end:
|
||||||
|
Invalid thread id: 1 java.lang.Exception: Invalid thread id: 1' resulted in an error.
|
||||||
|
!SUBENTRY 1 org.eclipse.cdt.dsf.gdb 4 10004 2019-10-08 15:35:06.402
|
||||||
|
!MESSAGE Failed to execute MI command:
|
||||||
|
-exec-next 1
|
||||||
|
Error message from debugger back end:
|
||||||
|
Invalid thread id: 1
|
||||||
|
!STACK 0
|
||||||
|
java.lang.Exception: Invalid thread id: 1
|
||||||
|
at org.eclipse.cdt.dsf.mi.service.command.AbstractMIControl$RxThread.processMIOutput(AbstractMIControl.java:941)
|
||||||
|
at org.eclipse.cdt.dsf.mi.service.command.AbstractMIControl$RxThread.run(AbstractMIControl.java:770)
|
||||||
|
|
||||||
|
!ENTRY fr.ac6.mcu.debug 4 5012 2019-10-08 16:10:19.151
|
||||||
|
!MESSAGE Error in final launch sequence
|
||||||
|
!STACK 1
|
||||||
|
org.eclipse.core.runtime.CoreException: Failed to execute MI command:
|
||||||
|
-target-select remote localhost:3333
|
||||||
|
|
||||||
|
Error message from debugger back end:
|
||||||
|
Remote communication error. Target disconnected.: No error.
|
||||||
|
at org.eclipse.cdt.dsf.concurrent.Query.get(Query.java:111)
|
||||||
|
at fr.ac6.mcu.debug.launching.MCUGDBJtagDSFLaunchConfigurationDelegate.launchDebugSession(MCUGDBJtagDSFLaunchConfigurationDelegate.java:248)
|
||||||
|
at org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate.launchDebugger(GdbLaunchDelegate.java:101)
|
||||||
|
at org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate.launch(GdbLaunchDelegate.java:90)
|
||||||
|
at fr.ac6.mcu.debug.launching.MCUGDBJtagDSFLaunchConfigurationDelegate.launch(MCUGDBJtagDSFLaunchConfigurationDelegate.java:306)
|
||||||
|
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:885)
|
||||||
|
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:739)
|
||||||
|
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1039)
|
||||||
|
at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1256)
|
||||||
|
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
|
||||||
|
Caused by: java.lang.Exception: Remote communication error. Target disconnected.: No error.
|
||||||
|
at org.eclipse.cdt.dsf.mi.service.command.AbstractMIControl$RxThread.processMIOutput(AbstractMIControl.java:941)
|
||||||
|
at org.eclipse.cdt.dsf.mi.service.command.AbstractMIControl$RxThread.run(AbstractMIControl.java:770)
|
||||||
|
!SUBENTRY 1 org.eclipse.cdt.dsf.gdb 4 10004 2019-10-08 16:10:19.152
|
||||||
|
!MESSAGE Failed to execute MI command:
|
||||||
|
-target-select remote localhost:3333
|
||||||
|
|
||||||
|
Error message from debugger back end:
|
||||||
|
Remote communication error. Target disconnected.: No error.
|
||||||
|
!STACK 0
|
||||||
|
java.lang.Exception: Remote communication error. Target disconnected.: No error.
|
||||||
|
at org.eclipse.cdt.dsf.mi.service.command.AbstractMIControl$RxThread.processMIOutput(AbstractMIControl.java:941)
|
||||||
|
at org.eclipse.cdt.dsf.mi.service.command.AbstractMIControl$RxThread.run(AbstractMIControl.java:770)
|
||||||
|
|
||||||
|
!ENTRY fr.ac6.mcu.debug 4 5012 2019-10-08 16:11:38.208
|
||||||
|
!MESSAGE Error in final launch sequence
|
||||||
|
!STACK 1
|
||||||
|
org.eclipse.core.runtime.CoreException: Failed to execute MI command:
|
||||||
|
-target-select remote localhost:3333
|
||||||
|
|
||||||
|
Error message from debugger back end:
|
||||||
|
Remote communication error. Target disconnected.: No error.
|
||||||
|
at org.eclipse.cdt.dsf.concurrent.Query.get(Query.java:111)
|
||||||
|
at fr.ac6.mcu.debug.launching.MCUGDBJtagDSFLaunchConfigurationDelegate.launchDebugSession(MCUGDBJtagDSFLaunchConfigurationDelegate.java:248)
|
||||||
|
at org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate.launchDebugger(GdbLaunchDelegate.java:101)
|
||||||
|
at org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate.launch(GdbLaunchDelegate.java:90)
|
||||||
|
at fr.ac6.mcu.debug.launching.MCUGDBJtagDSFLaunchConfigurationDelegate.launch(MCUGDBJtagDSFLaunchConfigurationDelegate.java:306)
|
||||||
|
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:885)
|
||||||
|
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:739)
|
||||||
|
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1039)
|
||||||
|
at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1256)
|
||||||
|
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
|
||||||
|
Caused by: java.lang.Exception: Remote communication error. Target disconnected.: No error.
|
||||||
|
at org.eclipse.cdt.dsf.mi.service.command.AbstractMIControl$RxThread.processMIOutput(AbstractMIControl.java:941)
|
||||||
|
at org.eclipse.cdt.dsf.mi.service.command.AbstractMIControl$RxThread.run(AbstractMIControl.java:770)
|
||||||
|
!SUBENTRY 1 org.eclipse.cdt.dsf.gdb 4 10004 2019-10-08 16:11:38.209
|
||||||
|
!MESSAGE Failed to execute MI command:
|
||||||
|
-target-select remote localhost:3333
|
||||||
|
|
||||||
|
Error message from debugger back end:
|
||||||
|
Remote communication error. Target disconnected.: No error.
|
||||||
|
!STACK 0
|
||||||
|
java.lang.Exception: Remote communication error. Target disconnected.: No error.
|
||||||
|
at org.eclipse.cdt.dsf.mi.service.command.AbstractMIControl$RxThread.processMIOutput(AbstractMIControl.java:941)
|
||||||
|
at org.eclipse.cdt.dsf.mi.service.command.AbstractMIControl$RxThread.run(AbstractMIControl.java:770)
|
||||||
|
|
||||||
|
!ENTRY org.eclipse.cdt.dsf 4 10005 2019-10-08 16:11:46.508
|
||||||
|
!MESSAGE Request for monitor: 'RequestMonitor (org.eclipse.cdt.dsf.concurrent.RequestMonitor@34bb33d4): Status ERROR: org.eclipse.cdt.dsf.gdb code=10004 Failed to execute MI command:
|
||||||
|
-exec-continue
|
||||||
|
Error message from debugger back end:
|
||||||
|
Invalid thread id: 1 java.lang.Exception: Invalid thread id: 1' resulted in an error.
|
||||||
|
!SUBENTRY 1 org.eclipse.cdt.dsf.gdb 4 10004 2019-10-08 16:11:46.508
|
||||||
|
!MESSAGE Failed to execute MI command:
|
||||||
|
-exec-continue
|
||||||
|
Error message from debugger back end:
|
||||||
|
Invalid thread id: 1
|
||||||
|
!STACK 0
|
||||||
|
java.lang.Exception: Invalid thread id: 1
|
||||||
|
at org.eclipse.cdt.dsf.mi.service.command.AbstractMIControl$RxThread.processMIOutput(AbstractMIControl.java:941)
|
||||||
|
at org.eclipse.cdt.dsf.mi.service.command.AbstractMIControl$RxThread.run(AbstractMIControl.java:770)
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -3,7 +3,9 @@ org.eclipse.debug.ui.MemoryView.orientation=0
|
|||||||
org.eclipse.debug.ui.PREF_LAUNCH_PERSPECTIVES=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?>\r\n<launchPerspectives/>\r\n
|
org.eclipse.debug.ui.PREF_LAUNCH_PERSPECTIVES=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?>\r\n<launchPerspectives/>\r\n
|
||||||
org.eclipse.debug.ui.switch_perspective_on_suspend=always
|
org.eclipse.debug.ui.switch_perspective_on_suspend=always
|
||||||
org.eclipse.debug.ui.user_view_bindings=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?>\r\n<viewBindings>\r\n<view id\="org.eclipse.debug.ui.VariableView">\r\n<perspective id\="org.eclipse.debug.ui.DebugPerspective" userAction\="opened"/>\r\n</view>\r\n<view id\="org.eclipse.debug.ui.DebugView">\r\n<perspective id\="org.eclipse.debug.ui.DebugPerspective" userAction\="closed"/>\r\n</view>\r\n<view id\="org.eclipse.debug.ui.BreakpointView">\r\n<perspective id\="org.eclipse.debug.ui.DebugPerspective" userAction\="opened"/>\r\n</view>\r\n<view id\="org.eclipse.ui.console.ConsoleView">\r\n<perspective id\="org.eclipse.debug.ui.DebugPerspective" userAction\="closed"/>\r\n</view>\r\n</viewBindings>\r\n
|
org.eclipse.debug.ui.user_view_bindings=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?>\r\n<viewBindings>\r\n<view id\="org.eclipse.debug.ui.VariableView">\r\n<perspective id\="org.eclipse.debug.ui.DebugPerspective" userAction\="opened"/>\r\n</view>\r\n<view id\="org.eclipse.debug.ui.DebugView">\r\n<perspective id\="org.eclipse.debug.ui.DebugPerspective" userAction\="closed"/>\r\n</view>\r\n<view id\="org.eclipse.debug.ui.BreakpointView">\r\n<perspective id\="org.eclipse.debug.ui.DebugPerspective" userAction\="opened"/>\r\n</view>\r\n<view id\="org.eclipse.ui.console.ConsoleView">\r\n<perspective id\="org.eclipse.debug.ui.DebugPerspective" userAction\="closed"/>\r\n</view>\r\n</viewBindings>\r\n
|
||||||
|
pref_state_memento.org.eclipse.debug.ui.BreakpointView=<?xml version\="1.0" encoding\="UTF-8"?>\r\n<VariablesViewMemento org.eclipse.debug.ui.SASH_DETAILS_PART\="315" org.eclipse.debug.ui.SASH_VIEW_PART\="684">\r\n<PRESENTATION_CONTEXT_PROPERTIES IMemento.internal.id\="org.eclipse.debug.ui.BreakpointView">\r\n<BOOLEAN BOOLEAN\="true" IMemento.internal.id\="org.eclipse.debug.ui.check"/>\r\n</PRESENTATION_CONTEXT_PROPERTIES>\r\n</VariablesViewMemento>
|
||||||
pref_state_memento.org.eclipse.debug.ui.DebugVieworg.eclipse.debug.ui.DebugView=<?xml version\="1.0" encoding\="UTF-8"?>\r\n<DebugViewMemento org.eclipse.debug.ui.BREADCRUMB_DROPDOWN_AUTO_EXPAND\="false"/>
|
pref_state_memento.org.eclipse.debug.ui.DebugVieworg.eclipse.debug.ui.DebugView=<?xml version\="1.0" encoding\="UTF-8"?>\r\n<DebugViewMemento org.eclipse.debug.ui.BREADCRUMB_DROPDOWN_AUTO_EXPAND\="false"/>
|
||||||
pref_state_memento.org.eclipse.debug.ui.RegisterView=<?xml version\="1.0" encoding\="UTF-8"?>\r\n<VariablesViewMemento org.eclipse.debug.ui.SASH_DETAILS_PART\="315" org.eclipse.debug.ui.SASH_VIEW_PART\="684">\r\n<PRESENTATION_CONTEXT_PROPERTIES IMemento.internal.id\="org.eclipse.debug.ui.RegisterView">\r\n<PERSISTABLE IMemento.internal.id\="org.eclipse.cdt.dsf.ui.elementFormatPersistable" PERSISTABLE\="org.eclipse.cdt.dsf.ui.simpleMapPersistableFactory">\r\n<type>java.lang.String</type>\r\n<name IMemento.internal.id\="r0" value\="HEX.Format"/>\r\n</PERSISTABLE>\r\n</PRESENTATION_CONTEXT_PROPERTIES>\r\n</VariablesViewMemento>
|
pref_state_memento.org.eclipse.debug.ui.RegisterView=<?xml version\="1.0" encoding\="UTF-8"?>\r\n<VariablesViewMemento org.eclipse.debug.ui.SASH_DETAILS_PART\="315" org.eclipse.debug.ui.SASH_VIEW_PART\="684">\r\n<PRESENTATION_CONTEXT_PROPERTIES IMemento.internal.id\="org.eclipse.debug.ui.RegisterView">\r\n<PERSISTABLE IMemento.internal.id\="org.eclipse.cdt.dsf.ui.elementFormatPersistable" PERSISTABLE\="org.eclipse.cdt.dsf.ui.simpleMapPersistableFactory">\r\n<type>java.lang.String</type>\r\n<name IMemento.internal.id\="r0" value\="HEX.Format"/>\r\n<name IMemento.internal.id\="r1" value\="HEX.Format"/>\r\n<name IMemento.internal.id\="r2" value\="HEX.Format"/>\r\n</PERSISTABLE>\r\n<STRING IMemento.internal.id\="CurrentNumericStyle" STRING\="DECIMAL.Format"/>\r\n</PRESENTATION_CONTEXT_PROPERTIES>\r\n</VariablesViewMemento>
|
||||||
|
pref_state_memento.org.eclipse.debug.ui.VariableView=<?xml version\="1.0" encoding\="UTF-8"?>\r\n<VariablesViewMemento org.eclipse.debug.ui.SASH_DETAILS_PART\="315" org.eclipse.debug.ui.SASH_VIEW_PART\="684">\r\n<PRESENTATION_CONTEXT_PROPERTIES IMemento.internal.id\="org.eclipse.debug.ui.VariableView">\r\n<INTEGER IMemento.internal.id\="initialChildCountLimitForCollections" INTEGER\="100"/>\r\n</PRESENTATION_CONTEXT_PROPERTIES>\r\n</VariablesViewMemento>
|
||||||
preferredDetailPanes=NumberFormatPane\:NumberFormatPane|DefaultDetailPane\:DefaultDetailPane|
|
preferredDetailPanes=NumberFormatPane\:NumberFormatPane|DefaultDetailPane\:DefaultDetailPane|
|
||||||
preferredTargets=org.eclipse.cdt.debug.ui.toggleCBreakpointTarget,org.eclipse.cdt.debug.ui.toggleCDynamicPrintfTarget\:org.eclipse.cdt.debug.ui.toggleCBreakpointTarget|
|
preferredTargets=org.eclipse.cdt.debug.ui.toggleCBreakpointTarget,org.eclipse.cdt.debug.ui.toggleCDynamicPrintfTarget\:org.eclipse.cdt.debug.ui.toggleCBreakpointTarget|
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
LaunchTargetManager/org.eclipse.launchbar.core.launchTargetType.local,Local/arch=x86_64
|
LaunchTargetManager/org.eclipse.launchbar.core.launchTargetType.local,Local/arch=x86_64
|
||||||
LaunchTargetManager/org.eclipse.launchbar.core.launchTargetType.local,Local/os=win32
|
LaunchTargetManager/org.eclipse.launchbar.core.launchTargetType.local,Local/os=win32
|
||||||
configDescList=org.eclipse.launchbar.core.descriptorType.default\:lab1 Debug,org.eclipse.launchbar.core.descriptorType.default\:lab2barnestr Debug
|
configDescList=org.eclipse.launchbar.core.descriptorType.default\:lab1 Debug,org.eclipse.launchbar.core.descriptorType.default\:lab2barnestr Debug,org.eclipse.launchbar.core.descriptorType.default\:lab3subroutines Debug
|
||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
org.eclipse.launchbar.core.descriptorType.default\:lab1\ Debug/activeLaunchMode=run
|
org.eclipse.launchbar.core.descriptorType.default\:lab1\ Debug/activeLaunchMode=run
|
||||||
org.eclipse.launchbar.core.descriptorType.default\:lab1\ Debug/activeLaunchTarget=org.eclipse.launchbar.core.launchTargetType.local\:Local
|
org.eclipse.launchbar.core.descriptorType.default\:lab1\ Debug/activeLaunchTarget=org.eclipse.launchbar.core.launchTargetType.local\:Local
|
||||||
org.eclipse.launchbar.core.descriptorType.default\:lab2barnestr\ Debug/activeLaunchMode=run
|
org.eclipse.launchbar.core.descriptorType.default\:lab2barnestr\ Debug/activeLaunchMode=run
|
||||||
|
org.eclipse.launchbar.core.descriptorType.default\:lab3subroutines\ Debug/activeLaunchMode=debug
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
</launchGroup>
|
</launchGroup>
|
||||||
<launchGroup id="org.eclipse.debug.ui.launchGroup.debug">
|
<launchGroup id="org.eclipse.debug.ui.launchGroup.debug">
|
||||||
<mruHistory>
|
<mruHistory>
|
||||||
<launch memento="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <launchConfiguration local="true" path="lab2barnestr Debug"/> "/>
|
<launch memento="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <launchConfiguration local="true" path="lab3subroutines Debug"/> "/>
|
||||||
</mruHistory>
|
</mruHistory>
|
||||||
<favorites/>
|
<favorites/>
|
||||||
</launchGroup>
|
</launchGroup>
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
</launchGroup>
|
</launchGroup>
|
||||||
<launchGroup id="org.eclipse.debug.ui.launchGroup.run">
|
<launchGroup id="org.eclipse.debug.ui.launchGroup.run">
|
||||||
<mruHistory>
|
<mruHistory>
|
||||||
<launch memento="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <launchConfiguration local="true" path="lab2barnestr Debug"/> "/>
|
<launch memento="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <launchConfiguration local="true" path="lab3subroutines Debug"/> "/>
|
||||||
</mruHistory>
|
</mruHistory>
|
||||||
<favorites/>
|
<favorites/>
|
||||||
</launchGroup>
|
</launchGroup>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
28
lab3subroutines/lab3subroutines Debug.cfg
Normal file
28
lab3subroutines/lab3subroutines Debug.cfg
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
# This is an NUCLEO-F446RE board with a single STM32F446RETx chip
|
||||||
|
#
|
||||||
|
# Generated by System Workbench for STM32
|
||||||
|
# Take care that such file, as generated, may be overridden without any early notice. Please have a look to debug launch configuration setup(s)
|
||||||
|
|
||||||
|
source [find interface/stlink.cfg]
|
||||||
|
|
||||||
|
set WORKAREASIZE 0x8000
|
||||||
|
|
||||||
|
transport select "hla_swd"
|
||||||
|
|
||||||
|
set CHIPNAME STM32F446RETx
|
||||||
|
|
||||||
|
# Enable debug when in low power modes
|
||||||
|
set ENABLE_LOW_POWER 1
|
||||||
|
|
||||||
|
# Stop Watchdog counters when halt
|
||||||
|
set STOP_WATCHDOG 1
|
||||||
|
|
||||||
|
# STlink Debug clock frequency
|
||||||
|
set CLOCK_FREQ 4000
|
||||||
|
|
||||||
|
# use hardware reset, connect under reset
|
||||||
|
# connect_assert_srst needed if low power mode application running (WFI...)
|
||||||
|
reset_config srst_only srst_nogate connect_assert_srst
|
||||||
|
set CONNECT_UNDER_RESET 1
|
||||||
|
|
||||||
|
source [find target/stm32f4x.cfg]
|
||||||
38
lab3subroutines/src/delay.s
Normal file
38
lab3subroutines/src/delay.s
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
# delay.s
|
||||||
|
# Trevor Barnes
|
||||||
|
# CE2801-031
|
||||||
|
# Description: A file for handling delay routines
|
||||||
|
|
||||||
|
|
||||||
|
.global delay_ms
|
||||||
|
# A subroutine to create a delay of a certain number of milliseconds
|
||||||
|
# Input:
|
||||||
|
# r0: Length of delay (ms)
|
||||||
|
delay_ms:
|
||||||
|
|
||||||
|
push {r1,r2,r3}
|
||||||
|
mov r3,r0
|
||||||
|
ms_delay:
|
||||||
|
# 250 iterations = 1/16 of a millisecond
|
||||||
|
mov r2, #0x10
|
||||||
|
# Loop 16 times
|
||||||
|
1:
|
||||||
|
# 250
|
||||||
|
mov r1, #0xFA
|
||||||
|
# Loop 250 times
|
||||||
|
2:
|
||||||
|
sub r1, #1
|
||||||
|
cmp r1, #0
|
||||||
|
bne 2b
|
||||||
|
|
||||||
|
sub r2, #1
|
||||||
|
cmp r2, #0
|
||||||
|
bne 1b
|
||||||
|
|
||||||
|
sub r0, #1
|
||||||
|
cmp r0, #0
|
||||||
|
bne ms_delay
|
||||||
|
|
||||||
|
mov r0,r3
|
||||||
|
pop {r1,r2,r3}
|
||||||
|
bx lr
|
||||||
@@ -23,3 +23,104 @@
|
|||||||
.equ GPIO_MODER, 0x00
|
.equ GPIO_MODER, 0x00
|
||||||
# GPIO Output Data Register
|
# GPIO Output Data Register
|
||||||
.equ GPIO_ODR, 0x14
|
.equ GPIO_ODR, 0x14
|
||||||
|
|
||||||
|
.global num_to_LED_init
|
||||||
|
# Initializes the GPIO port pins to be outputs
|
||||||
|
num_to_LED_init:
|
||||||
|
|
||||||
|
# Store registers before use
|
||||||
|
push {r1,r2,r3}
|
||||||
|
|
||||||
|
|
||||||
|
ldr r1, =RCC_BASE
|
||||||
|
|
||||||
|
# Read, Modify, Write
|
||||||
|
ldr r2, [r1, #RCC_AHB1ENR]
|
||||||
|
orr r2, r2, #RCC_GPIOBEN
|
||||||
|
str r2, [r1, #RCC_AHB1ENR]
|
||||||
|
|
||||||
|
# Enable PB5-PB10, PB12-PB15 to be outputs
|
||||||
|
|
||||||
|
ldr r1, =GPIOB_BASE
|
||||||
|
|
||||||
|
ldr r2, [r1, #GPIO_MODER]
|
||||||
|
|
||||||
|
movw r3, #0x5400
|
||||||
|
movt r3, #0x5515
|
||||||
|
orr r2, r2, r3
|
||||||
|
|
||||||
|
movw r3, #0xA800
|
||||||
|
movt r3, #0xAA2A
|
||||||
|
bic r2, r2, r3
|
||||||
|
|
||||||
|
str r2, [r1, #GPIO_MODER]
|
||||||
|
|
||||||
|
# Return the original register values
|
||||||
|
pop {r1,r2,r3}
|
||||||
|
# Branch back to link location
|
||||||
|
bx lr
|
||||||
|
|
||||||
|
.global LED_test_loop
|
||||||
|
|
||||||
|
LED_test_loop:
|
||||||
|
|
||||||
|
push {r0,r1,r2,lr}
|
||||||
|
|
||||||
|
bl num_to_LED_init
|
||||||
|
ldr r1, =GPIOB_BASE
|
||||||
|
|
||||||
|
loop:
|
||||||
|
|
||||||
|
ldr r2,[r1,#GPIO_ODR]
|
||||||
|
orr r2,r2,#0x0020
|
||||||
|
str r2,[r1,#GPIO_ODR]
|
||||||
|
|
||||||
|
mov r0, #0x3E8
|
||||||
|
bl delay_ms
|
||||||
|
|
||||||
|
ldr r2,[r1,#GPIO_ODR]
|
||||||
|
bic r2,r2,#0x0020
|
||||||
|
str r2,[r1,#GPIO_ODR]
|
||||||
|
|
||||||
|
mov r0, #0x3E8
|
||||||
|
bl delay_ms
|
||||||
|
|
||||||
|
b loop
|
||||||
|
|
||||||
|
pop {r0,r1,r2,pc}
|
||||||
|
|
||||||
|
.global num_to_LED
|
||||||
|
# Takes in a 10-bit value and displays it on the LEDs in binary
|
||||||
|
# Input:
|
||||||
|
# r0: Input binary value
|
||||||
|
num_to_LED:
|
||||||
|
|
||||||
|
push {r1,r2,lr}
|
||||||
|
|
||||||
|
bl num_to_LED_init
|
||||||
|
# Extract "pre-PB11" bit field
|
||||||
|
ubfx r1, r0, #0, #6
|
||||||
|
# extract "post-PB11" bit field
|
||||||
|
ubfx r2, r2, #6, #4
|
||||||
|
# Clear input register
|
||||||
|
mov r0, #0
|
||||||
|
# Insert bit field PB5-PB10
|
||||||
|
bfi r0, r1, #5, #6
|
||||||
|
# Insert bit field PB12-PB15
|
||||||
|
bfi r0, r2, #12, #4
|
||||||
|
|
||||||
|
# Clear register values before use
|
||||||
|
mov r1, #0
|
||||||
|
mov r2, #0
|
||||||
|
ldr r1, =GPIOB_BASE
|
||||||
|
|
||||||
|
ldr r2,[r1,#GPIO_ODR]
|
||||||
|
bfc r2,#0,#16
|
||||||
|
str r2,[r1,#GPIO_ODR]
|
||||||
|
|
||||||
|
ldr r2,[r1,#GPIO_ODR]
|
||||||
|
orr r2,r2,r0
|
||||||
|
str r2,[r1,#GPIO_ODR]
|
||||||
|
|
||||||
|
pop {r1,r2,pc}
|
||||||
|
bx lr
|
||||||
|
|||||||
@@ -12,4 +12,136 @@
|
|||||||
.global main
|
.global main
|
||||||
|
|
||||||
main:
|
main:
|
||||||
|
mov r0, #0
|
||||||
|
mov r1, #0
|
||||||
|
mov r2, #0
|
||||||
|
|
||||||
|
main_loop:
|
||||||
|
|
||||||
|
mov r0, #1234
|
||||||
|
bl num_to_ASCII
|
||||||
|
mov r1, r0
|
||||||
|
# r1 is 4 character ASCII value
|
||||||
|
mov r0, #500
|
||||||
|
# Display 1
|
||||||
|
ubfx r0, r1, #24, #8
|
||||||
|
bl num_to_LED
|
||||||
|
mov r0, #500
|
||||||
|
bl delay_ms
|
||||||
|
# Display 2
|
||||||
|
ubfx r0, r1, #16, #8
|
||||||
|
bl num_to_LED
|
||||||
|
mov r0, #500
|
||||||
|
bl delay_ms
|
||||||
|
# Display 3
|
||||||
|
ubfx r0, r1, #8, #8
|
||||||
|
bl num_to_LED
|
||||||
|
mov r0, #500
|
||||||
|
bl delay_ms
|
||||||
|
# Display 4
|
||||||
|
ubfx r0, r1, #0, #8
|
||||||
|
bl num_to_LED
|
||||||
|
mov r0, #500
|
||||||
|
bl delay_ms
|
||||||
|
b main_loop
|
||||||
|
|
||||||
|
|
||||||
|
end:
|
||||||
|
b end
|
||||||
|
.global num_to_ASCII
|
||||||
|
|
||||||
|
# Takes in a value from 0-9999 and converts it to ASCII
|
||||||
|
# Input:
|
||||||
|
# r0: Input binary value
|
||||||
|
# Output:
|
||||||
|
# r1: Output 4 ASCII characters
|
||||||
|
num_to_ASCII:
|
||||||
|
|
||||||
|
# If outside of range, return ASCII "Err."
|
||||||
|
push {r1,r2,r3,lr}
|
||||||
|
|
||||||
|
cmp r0,#0
|
||||||
|
blt out_of_range
|
||||||
|
@ cmp r0,#9999
|
||||||
|
@ bgt out_of_range
|
||||||
|
|
||||||
|
# Normal conversion behavior
|
||||||
|
mov r1, #16
|
||||||
|
lsl r0, #3
|
||||||
|
sub r1, #3
|
||||||
|
shift_cycle:
|
||||||
|
|
||||||
|
lsl r0, #1
|
||||||
|
sub r1, #1
|
||||||
|
|
||||||
|
# Verify Each Nibble is less than or equal to 4
|
||||||
|
ubfx r2, r0, #16, #4
|
||||||
|
# If value is less than or equal to 4, then skip to next nibble
|
||||||
|
cmp r2, #4
|
||||||
|
ble 2f
|
||||||
|
add r2, #3
|
||||||
|
bfi r0, r2, #16, #4
|
||||||
|
2: ubfx r2, r0, #20, #4
|
||||||
|
# If value is less than or equal to 4, then skip to next nibble
|
||||||
|
cmp r2, #4
|
||||||
|
ble 3f
|
||||||
|
add r2, #3
|
||||||
|
bfi r0, r2, #20, #4
|
||||||
|
3: ubfx r2, r0, #24, #4
|
||||||
|
# If value is less than or equal to 4, then skip to next nibble
|
||||||
|
cmp r2, #4
|
||||||
|
ble 4f
|
||||||
|
add r2, #3
|
||||||
|
bfi r0, r2, #24, #4
|
||||||
|
4: ubfx r2, r0, #28, #4
|
||||||
|
# If value is less than or equal to 4 skip to end
|
||||||
|
cmp r2, #4
|
||||||
|
ble end_verify_nibbles
|
||||||
|
add r2, #3
|
||||||
|
bfi r0, r2, #28, #4
|
||||||
|
end_verify_nibbles:
|
||||||
|
|
||||||
|
# If value hasn't been shifted 16 times, shift again
|
||||||
|
cmp r1, #0
|
||||||
|
bne shift_cycle
|
||||||
|
mov r3, #3
|
||||||
|
# Encode BCD numbers to ASCII
|
||||||
|
|
||||||
|
# Extract ones nibble
|
||||||
|
ubfx r2, r0, #16, #4
|
||||||
|
# Insert ones nibble
|
||||||
|
bfi r1, r2, #0, #4
|
||||||
|
# Insert 3 in front of nibble for ASCII encoding
|
||||||
|
bfi r1, r3, #4, #4
|
||||||
|
|
||||||
|
# Extract tens nibble
|
||||||
|
ubfx r2, r0, #20, #4
|
||||||
|
# Insert tens nibble
|
||||||
|
bfi r1, r2, #8, #4
|
||||||
|
# Insert 3 in front of nibble for ASCII encoding
|
||||||
|
bfi r1, r3, #12, #4
|
||||||
|
|
||||||
|
# Extract hundreds nibble
|
||||||
|
ubfx r2, r0, #24, #4
|
||||||
|
# Insert hundreds nibble
|
||||||
|
bfi r1, r2, #16, #4
|
||||||
|
# Insert 3 in front of nibble for ASCII encoding
|
||||||
|
bfi r1, r3, #20, #4
|
||||||
|
|
||||||
|
# Extract thousands nibble
|
||||||
|
ubfx r2, r0, #28, #4
|
||||||
|
# Insert thousands nibble
|
||||||
|
bfi r1, r2, #24, #4
|
||||||
|
# Insert 3 in front of nibble for ASCII encoding
|
||||||
|
bfi r1, r3, #28, #4
|
||||||
|
|
||||||
|
b end_ASCII
|
||||||
|
out_of_range:
|
||||||
|
# Insert ASCII "Err."
|
||||||
|
movw r1, #0x722E
|
||||||
|
movt r1, #0x4572
|
||||||
|
|
||||||
|
end_ASCII:
|
||||||
|
mov r0, r1
|
||||||
|
pop {r1,r2,r3,lr}
|
||||||
|
bx lr
|
||||||
|
|||||||
Reference in New Issue
Block a user