关于stm8控制LED问题

2019-03-23 19:50发布

在仿真时出错,下面是出错的问题,请高手指教

代码
segment'ram0'BYTES.Roo ds.b 1.Ro1 ds.b 1.Ro2 ds.b 1.Ro3 ds.b 1.Ro4 ds.b 1.Ro5 ds.b 1.Ro6 ds.b 1.Ro7 ds.b 1.Ro8 ds.b 1

MOV TIM1_SMCR,#00HBRES TIM1_ETR,#6MOV TIM1_PSCRH,#00HMOV TIM1_PSCRL,#01HMOV TIM1_ARRH,#{HIGH 10000}MOV TIM1_ARRL,#{LOW 10000}MOV TIM1_RCR,#00HMOV TIM1_CR1,#04HBSET TIM1_EGR,#0BSET TIM1_IER,#0BSET TIM1_CR1,#0



interrupt TIM1_Interrupt_OverTIM1_Interrupt_Over.l  BRES TIM1_SR1,#0 DEC R10 JRNE TIM1_Interrupt_Over_EXIT MOV R10,#50 BCPL PC_ODR,#4 TIM1_Interrupt_Over_EXIT.L  IRET IRET IRET IRET

出错问题:
 ----------- Project my - ST Assembler Linker - Configuration Debug ------------- Assembling mapping.asm... asm -sym -li=Debugmapping.lsr mapping.asm -I="F:Program FilesSTM8asminclude" -obj=Debugmapping.obj STMicroelectronics assembler v4.52 No errors on assembly of 'f:program fileschengxustm8led_1mapping.asm' Assembling main.asm... asm -sym -li=Debugmain.lsr main.asm -I="F:Program FilesSTM8asminclude" -obj=Debugmain.obj STMicroelectronics assembler v4.52 f:program fileschengxustm8led_1main.asm(52): as1 : Fatal 70: Cannot have DS.X in segment containing code/data! .. only for [void] segs! 'C->D' The command: "asm -sym -li=Debugmain.lsr main.asm -I="F:Program FilesSTM8asminclude" -obj=Debugmain.obj" has failed, the returned value is: 1 exit code=1. my.s19 - 1 error(s), 0 warning(s)

[ 本帖最后由 STM8S105C6 于 2012-4-20 17:22 编辑 ] 此帖出自小平头技术问答
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。