打印
[STM8]

STM8问题2222???

[复制链接]
3153|11
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
win2000_li|  楼主 | 2009-6-26 18:46 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
1、如何设置让编译输出窗口看到代码占用的存贮大小及剩余空间? 
  

2、程序在运行中,如何查看寄存器的动态变化,如IO高低变化等??
  
  变量如何动态变化。

3、代码中的变量右键中的(go to definition of "定义的变量等")这项是灰色的,不能跟踪?换成进入软件DEGBUG,发现右键有这项,但也不能跟踪到变量定义处,但只能跟踪函数原型处。 

4、如何设置自定义关键字的色彩,如ST的固件库有u8,u16,ENABLE,TURE等,让它着色方便. 

沙发
ZRL700424| | 2009-6-28 09:59 | 只看该作者

同样关心1和2两个问题,3、4不关心

使用特权

评论回复
板凳
win2000_li|  楼主 | 2009-6-29 09:12 | 只看该作者

顶一个

顶一个!!!!!!!!!

使用特权

评论回复
地板
汉之云| | 2009-6-29 10:04 | 只看该作者

回一个

1. 可以看.MAP文件,里面很详细. 一般在debug里面

2. 寄存器的变化可以用view - registers, 变量可以用 view - watch, 不过变量要自己添加进去. 你也可以在程序中选中要观察的变量,点右键,再点quick watch

3. 函数定义处,就是函数原型处. 想定位到所有引用处或声明处...还是用source insight吧.

4.在菜单 tools - options -style/language 中可以试试

使用特权

评论回复
5
win2000_li|  楼主 | 2009-6-29 10:16 | 只看该作者

第一个是正确的。谢谢,正在看第二个


Map of Debug estflat.sm8 from link file Debug estflat.lkf - Fri Jun 26 18:13:58 2009


                               --------
                               Segments
                               --------

start 00008080 end 00008080 length     0 segment .const
start 00008083 end 000081be length   315 segment .text
start 00004000 end 00004000 length     0 segment .eeprom
start 00000000 end 00000000 length     0 segment .bsct
start 00000000 end 00000006 length     6 segment .ubsct
start 00000006 end 00000006 length     0 segment .bit
start 00000006 end 00000006 length     0 segment .share
start 00000100 end 00000100 length     0 segment .data
start 00000100 end 00000100 length     0 segment .bss
start 00000000 end 00003b64 length 15204 segment .debug
start 00008000 end 00008080 length   128 segment .const
start 00008080 end 00008083 length     3 segment .init


                               -------
                               Modules
                               -------

C:Program FilesCOSMICCXSTM8_16KLibcrtsi0.sm8:
start 00008083 end 000080ce length    75 section .text
start 00000100 end 00000100 length     0 section .bss
start 00000000 end 00000000 length     0 section .ubsct

Debugstm8a_clk.o:
start ******** end ******** length     0 section .text *** removed ***
start 00000000 end 000017a3 length  6051 section .debug
start ******** end ******** length     0 section .const *** removed ***

Debugstm8a_exti.o:
start ******** end ******** length     0 section .text *** removed ***
start 000017a3 end 00001c32 length  1167 section .debug

Debugstm8a_flash.o:
start ******** end ******** length     0 section .text *** removed ***
start 00001c32 end 00002a00 length  3534 section .debug

Debugstm8a_gpio.o:
start 000080ce end 00008179 length   171 section .text
start 00002a00 end 0000340a length  2570 section .debug

Debugstm8a_rst.o:
start ******** end ******** length     0 section .text *** removed ***
start 0000340a end 00003639 length   559 section .debug

Debugstm8a_wwdg.o:
start ******** end ******** length     0 section .text *** removed ***
start 00003639 end 0000387f length   582 section .debug

Debugmain.o:
start 00008179 end 000081bd length    68 section .text
start 0000387f end 000039f9 length   378 section .debug

(C:Program FilesCOSMICCXSTM8_16KLiblibm0.sm8)xreg.o:
start 00000000 end 00000003 length     3 section .ubsct

(C:Program FilesCOSMICCXSTM8_16KLiblibm0.sm8)yreg.o:
start 00000003 end 00000006 length     3 section .ubsct

Debugstm8_interrupt_vector.o:
start 000081bd end 000081be length     1 section .text
start 000039f9 end 00003b64 length   363 section .debug
start 00008000 end 00008080 length   128 section .const


                             -----------
                             Stack usage
                             -----------

Debugmain.o:
_Delay                           4   (4)
_main                       >   11   (5)

Debugstm8_interrupt_vector.o:
f_NonHandledInterrupt       >    5   (5)

Debugstm8a_gpio.o:
_GPIO_DeInit                >    2   (2)
_GPIO_ExternalPullUpConfig  >    6   (6)
_GPIO_Init                       6   (6)
_GPIO_ReadInputData         >    2   (2)
_GPIO_ReadInputPin          >    5   (5)
_GPIO_ReadOutputData        >    2   (2)
_GPIO_Write                 >    5   (5)
_GPIO_WriteHigh             >    5   (5)
_GPIO_WriteLow              >    5   (5)
_GPIO_WriteReverse               5   (5)

Stack size: 16


                              ---------
                              Call tree
                              ---------
   1 > _GPIO_DeInit: (2)

   2 > _GPIO_ExternalPullUpConfig: (6)

   3 > _GPIO_ReadInputData: (2)

   4 > _GPIO_ReadInputPin: (5)

   5 > _GPIO_ReadOutputData: (2)

   6 > _GPIO_Write: (5)

   7 > _GPIO_WriteHigh: (5)

   8 > _GPIO_WriteLow: (5)

   9 > __stext: (0)

  10 > _main: (5)
  11      + _Delay: (4)
  12      + _GPIO_Init: (6)
  13      + _GPIO_WriteReverse: (5)
       
  14 > f_NonHandledInterrupt: (5)

  15   _Delay --> 11

  16   _GPIO_Init --> 12

  17   _GPIO_WriteReverse --> 13



                               -------
                               Symbols
                               -------

_CLKPrescTable                   ********   *** removed from Debugstm8a_clk.o ***
_CLK_AdjustHSICalibrationValue   ********   *** removed from Debugstm8a_clk.o ***
_CLK_CANConfig                   ********   *** removed from Debugstm8a_clk.o ***
_CLK_CCOCmd                      ********   *** removed from Debugstm8a_clk.o ***
_CLK_CCOConfig                   ********   *** removed from Debugstm8a_clk.o ***
_CLK_ClearITPendingBit           ********   *** removed from Debugstm8a_clk.o ***
_CLK_ClockSecuritySystemEnable   ********   *** removed from Debugstm8a_clk.o ***
_CLK_ClockSwitchCmd              ********   *** removed from Debugstm8a_clk.o ***
_CLK_ClockSwitchConfig           ********   *** removed from Debugstm8a_clk.o ***
_CLK_DeInit                      ********   *** removed from Debugstm8a_clk.o ***
_CLK_FastHaltWakeUpCmd           ********   *** removed from Debugstm8a_clk.o ***
_CLK_GetClockFreq                ********   *** removed from Debugstm8a_clk.o ***
_CLK_GetFlagStatus               ********   *** removed from Debugstm8a_clk.o ***
_CLK_GetITStatus                 ********   *** removed from Debugstm8a_clk.o ***
_CLK_GetSYSCLKSource             ********   *** removed from Debugstm8a_clk.o ***
_CLK_HSECmd                      ********   *** removed from Debugstm8a_clk.o ***
_CLK_HSICmd                      ********   *** removed from Debugstm8a_clk.o ***
_CLK_HSIPrescalerConfig          ********   *** removed from Debugstm8a_clk.o ***
_CLK_ITConfig                    ********   *** removed from Debugstm8a_clk.o ***
_CLK_LSICmd                      ********   *** removed from Debugstm8a_clk.o ***
_CLK_PeripheralClockConfig       ********   *** removed from Debugstm8a_clk.o ***
_CLK_SWIMConfig                  ********   *** removed from Debugstm8a_clk.o ***
_CLK_SYSCLKConfig                ********   *** removed from Debugstm8a_clk.o ***
_CLK_SYSCLKEmergencyClear        ********   *** removed from Debugstm8a_clk.o ***
_CLK_SlowActiveHaltWakeUpCmd     ********   *** removed from Debugstm8a_clk.o ***
_Delay                           00008179   defined in Debugmain.o section .text
_EXTI_DeInit                     ********   *** removed from Debugstm8a_exti.o ***
_EXTI_GetExtIntSensitivity       ********   *** removed from Debugstm8a_exti.o ***
_EXTI_GetTLISensitivity          ********   *** removed from Debugstm8a_exti.o ***
_EXTI_SetExtIntSensitivity       ********   *** removed from Debugstm8a_exti.o ***
_EXTI_SetTLISensitivity          ********   *** removed from Debugstm8a_exti.o ***
_FLASH_DeInit                    ********   *** removed from Debugstm8a_flash.o ***
_FLASH_EraseBlock                ********   *** removed from Debugstm8a_flash.o ***
_FLASH_EraseByte                 ********   *** removed from Debugstm8a_flash.o ***
_FLASH_EraseOptionByte           ********   *** removed from Debugstm8a_flash.o ***
_FLASH_GetBootSize               ********   *** removed from Debugstm8a_flash.o ***
_FLASH_GetFlagStatus             ********   *** removed from Debugstm8a_flash.o ***
_FLASH_GetLowPowerMode           ********   *** removed from Debugstm8a_flash.o ***
_FLASH_GetProgrammingTime        ********   *** removed from Debugstm8a_flash.o ***
_FLASH_ITConfig                  ********   *** removed from Debugstm8a_flash.o ***
_FLASH_Lock                      ********   *** removed from Debugstm8a_flash.o ***
_FLASH_ProgramBlock              ********   *** removed from Debugstm8a_flash.o ***
_FLASH_ProgramByte               ********   *** removed from Debugstm8a_flash.o ***
_FLASH_ProgramOptionByte         ********   *** removed from Debugstm8a_flash.o ***
_FLASH_ProgramWord               ********   *** removed from Debugstm8a_flash.o ***
_FLASH_ReadByte                  ********   *** removed from Debugstm8a_flash.o ***
_FLASH_ReadOptionByte            ********   *** removed from Debugstm8a_flash.o ***
_FLASH_SetLowPowerMode           ********   *** removed from Debugstm8a_flash.o ***
_FLASH_SetProgrammingTime        ********   *** removed from Debugstm8a_flash.o ***
_FLASH_Unlock                    ********   *** removed from Debugstm8a_flash.o ***
_FLASH_WaitForLastOperation      ********   *** removed from Debugstm8a_flash.o ***
_GPIO_DeInit                     000080ce   defined in Debugstm8a_gpio.o section .text
_GPIO_ExternalPullUpConfig       00008161   defined in Debugstm8a_gpio.o section .text
_GPIO_Init                       000080d6   defined in Debugstm8a_gpio.o section .text
                                            used in Debugmain.o
_GPIO_ReadInputData              00008157   defined in Debugstm8a_gpio.o section .text
_GPIO_ReadInputPin               0000815a   defined in Debugstm8a_gpio.o section .text
_GPIO_ReadOutputData             00008155   defined in Debugstm8a_gpio.o section .text
_GPIO_Write                      00008137   defined in Debugstm8a_gpio.o section .text
_GPIO_WriteHigh                  0000813f   defined in Debugstm8a_gpio.o section .text
_GPIO_WriteLow                   00008146   defined in Debugstm8a_gpio.o section .text
_GPIO_WriteReverse               0000814e   defined in Debugstm8a_gpio.o section .text
                                            used in Debugmain.o
_HSIDivFactor                    ********   *** removed from Debugstm8a_clk.o ***
_RST_ClearFlag                   ********   *** removed from Debugstm8a_rst.o ***
_RST_GetFlagStatus               ********   *** removed from Debugstm8a_rst.o ***
_WWDG_GetCounter                 ********   *** removed from Debugstm8a_wwdg.o ***
_WWDG_Init                       ********   *** removed from Debugstm8a_wwdg.o ***
_WWDG_SWReset                    ********   *** removed from Debugstm8a_wwdg.o ***
_WWDG_SetCounter                 ********   *** removed from Debugstm8a_wwdg.o ***
_WWDG_SetWindowValue             ********   *** removed from Debugstm8a_wwdg.o ***
__endzp                          00000006   defined in command file section .ubsct
                                            used in C:Program FilesCOSMICCXSTM8_16KLibcrtsi0.sm8
__idesc__                        00008080   defined in linker section .init
                                            used in C:Program FilesCOSMICCXSTM8_16KLibcrtsi0.sm8
__memory                         00000100   defined in command file section .bss
                                            used in C:Program FilesCOSMICCXSTM8_16KLibcrtsi0.sm8
__stack                          000017ff   defined in command file
                                            used in C:Program FilesCOSMICCXSTM8_16KLibcrtsi0.sm8
__stext                          00008083   defined in C:Program FilesCOSMICCXSTM8_16KLibcrtsi0.sm8 section .text
                                            used in Debugstm8_interrupt_vector.o
__vectab                         00008000   defined in Debugstm8_interrupt_vector.o section .const
_exit                            000080cc   defined in C:Program FilesCOSMICCXSTM8_16KLibcrtsi0.sm8 section .text
_main                            00008189   defined in Debugmain.o section .text
                                            used in C:Program FilesCOSMICCXSTM8_16KLibcrtsi0.sm8
c_x                              00000000   defined in (C:Program FilesCOSMICCXSTM8_16KLiblibm0.sm8)xreg.o section .ubsct
                                            used in C:Program FilesCOSMICCXSTM8_16KLibcrtsi0.sm8
                                                    Debugstm8a_flash.o
                                                    (C:Program FilesCOSMICCXSTM8_16KLiblibm0.sm8)ldiv.o
                                                    (C:Program FilesCOSMICCXSTM8_16KLiblibm0.sm8)umul.o
c_y                              00000003   defined in (C:Program FilesCOSMICCXSTM8_16KLiblibm0.sm8)yreg.o section .ubsct
                                            used in C:Program FilesCOSMICCXSTM8_16KLibcrtsi0.sm8
                                                    (C:Program FilesCOSMICCXSTM8_16KLiblibm0.sm8)umul.o
f_NonHandledInterrupt            000081bd   defined in Debugstm8_interrupt_vector.o section .text

使用特权

评论回复
6
win2000_li|  楼主 | 2009-6-29 11:17 | 只看该作者

A

第二个问题,变量还是可以的,但是寄存器的动态显示是不行的。

第三个问题,我想也只有用SI 了。

第四个问题,这样做也可以,但是我想用.DLL直接搞定,或那位高手

直接搞一个上颜色的补丁也可以啊。哈哈!!

希望高手们帮助啊

使用特权

评论回复
7
汉之云| | 2009-6-29 11:38 | 只看该作者

关于第二点

可以把寄存器加到watch窗口就可以了,或者你可以直接看MEMORY对应地址,然后再read on the fly. 这一点STM8做得不错

但要注意,有些寄存器观测后某些位的值就清掉了,对于这种寄存器使用read on the fly要心里有数

使用特权

评论回复
8
win2000_li|  楼主 | 2009-6-29 11:43 | 只看该作者

谢谢,兄弟的指点。

谢谢指点。。。。。。。

使用特权

评论回复
9
香水城| | 2009-6-29 19:22 | 只看该作者

STM8首创了在单片机中Read on the fly调试

不要看花眼噢~~~~

使用特权

评论回复
10
walnutcy| | 2009-6-30 20:53 | 只看该作者

第一个问题,也可通过在编译完成时,自动转换成BIN文件来

并在命令窗口自动提示。

使用特权

评论回复
11
win2000_li|  楼主 | 2009-7-8 09:04 | 只看该作者

walnutcy老师·!

请指点。。。。如何操作??

使用特权

评论回复
12
f1iceman| | 2012-4-9 15:57 | 只看该作者
5# win2000_li
请问在。map文件里看到的这些东西,我的里面有一段显示
Debug\map.o:
start 000085e7 end 0000a495 length  7854 section .debug
start 000001f6 end 00000263 length   109 section .info.
start ******** end ******** length     0 section .const *** removed ***


为什么会被删除掉了,还有这个地址也没有显示了。不知道什么原因,本来是想给这段分配地址的,但没有成功

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

142

主题

718

帖子

1

粉丝