共3条 1/1
1
跳转至
页
AVR,comm 请问AVR中的.comm是什么意思?
问
答
1: 什么处有.
comm?
答
2: gas.
commdeclares a
common symbol named symbol. When linking, a
common symbol in one object file may be merged with a defined or
common symbol of the same name in another object file. If ld does not see a definition for the symbol–just one or more
common symbols–then it will allocate length bytes of uninitialized memory. length must be an absolute expression. If ld sees multiple
common symbols with the same name, and they do not all have the same size, it will allocate space using the largest size.
When using ELF, the . commdirective takes an optional third argument. This is the desired alignment of the symbol, specified as a byte boundary (for example, an alignment of 16 means that the least signifi CANt 4 bits of the address should be zero). The alignment must be an absolute expression, and it must be a power of two. If ld allocates uninitialized memory for the common symbol, it will use the alignment when placing the symbol. If no alignment is specified, as will set the alignment to the largest power of two less than or equal to the size of the symbol, up to a maximum of 16.
答 3: 这么长一段英文,谢谢 答 4: 加段程序 ;512 byte sector buffer in internal RAM
.global mmc_sbuf
. commmmc_sbuf,512
. commlba,3
get_spi_byte:
ser r24
spi_tx_rx:
out SPDR, r24 ; send over SPI
vspi1: sbis SPSR,SPIF ; while flag is clear
rjmp vspi1 ; wait for SPI
in r24, SPDR ; and get input data
ret
When using ELF, the . commdirective takes an optional third argument. This is the desired alignment of the symbol, specified as a byte boundary (for example, an alignment of 16 means that the least signifi CANt 4 bits of the address should be zero). The alignment must be an absolute expression, and it must be a power of two. If ld allocates uninitialized memory for the common symbol, it will use the alignment when placing the symbol. If no alignment is specified, as will set the alignment to the largest power of two less than or equal to the size of the symbol, up to a maximum of 16.
答 3: 这么长一段英文,谢谢 答 4: 加段程序 ;512 byte sector buffer in internal RAM
.global mmc_sbuf
. commmmc_sbuf,512
. commlba,3
get_spi_byte:
ser r24
spi_tx_rx:
out SPDR, r24 ; send over SPI
vspi1: sbis SPSR,SPIF ; while flag is clear
rjmp vspi1 ; wait for SPI
in r24, SPDR ; and get input data
ret
共3条 1/1
1
跳转至
页
回复
有奖活动 | |
---|---|
【有奖活动】七夕福利大放送啦~ | |
话不多说,快进群! | |
请大声喊出:我要开发板! | |
【有奖活动】EEPW网站征稿正在进行时,欢迎踊跃投稿啦 | |
奖!发布技术笔记,技术评测贴换取您心仪的礼品 | |
打赏了!打赏了!打赏了! |
打赏帖 | |
---|---|
STM32H7S78-DKPWM驱动被打赏10分 | |
STM32H7S78-DKMQTT远程数据交互被打赏50分 | |
哪个才是真正的D类功放?如何计算他们的效率被打赏50分 | |
史密斯圆图进行阻抗匹配的过程被打赏50分 | |
STM32H7S78-DK基于TCP-CLIENT的冷链管理被打赏70分 | |
换能器扫频锁频电路被打赏50分 | |
STM32H7S78-DK移植LWIP被打赏50分 | |
NUCLEO-F412驱动TFT屏幕被打赏70分 | |
“DFRobot盖革计数器模块评测”实测身边的辐射源——天然石材被打赏10分 | |
换取手持数字示波器湖南创乐博C51广告牌被打赏9分 |