在C应用程序中,我想在变量,堆栈和dma地址范围之后的地址处放置一个大缓冲区。当然,我可以在链接描述文件中的所需位置定义一个部分,并在C中声明一个大数组,并为该数组提供一个section属性。但我想在没有实际声明大数组的情况下这样做,因为它使得可执行文件太大了。我想使用数组地址来做同样的事情
我正在使用gcc并尝试使用我在C源文件中的链接描述文件中定义的地址
这是我尝试的方式。
在链接器脚本文件中(在我的例子中是ldabtsm.lds.S),
Traceback (most recent call last):
File "C:\Python27\Working Scripts\CSV to xls.py", line 20, in <module>
merge_all_to_a_book(glob.glob(folder + f), final_folder + f + ".xls")
File "C:\Python27\lib\site-packages\pyexcel\cookbook.py", line 148, in merge_all_to_a_book
merged.save_as(outfilename)
File "C:\Python27\lib\site-packages\pyexcel\book.py", line 249, in save_as
return save_book(self, file_name=filename)
File "C:\Python27\lib\site-packages\pyexcel\sources\__init__.py", line 46, in save_book
return _save_any(source, book)
File "C:\Python27\lib\site-packages\pyexcel\sources\__init__.py", line 50, in _save_any
source.write_data(instance)
File "C:\Python27\lib\site-packages\pyexcel\sources\file_source_output.py", line 58, in write_data
**self._keywords)
File "C:\Python27\lib\site-packages\pyexcel\renderers\_excel.py", line 25, in render_book_to_file
save_data(file_name, book.to_dict(), **keywords)
File "C:\Python27\lib\site-packages\pyexcel_io\io.py", line 75, in save_data
**keywords)
File "C:\Python27\lib\site-packages\pyexcel_io\io.py", line 96, in store_data
writer.write(data)
File "C:\Python27\lib\site-packages\pyexcel_io\book.py", line 161, in write
sheet_writer = self.create_sheet(sheet_name)
File "C:\Python27\lib\site-packages\pyexcel_xls\xls.py", line 206, in create_sheet
return XLSheetWriter(self.work_book, None, name)
File "C:\Python27\lib\site-packages\pyexcel_io\sheet.py", line 139, in __init__
self.set_sheet_name(sheet_name)
File "C:\Python27\lib\site-packages\pyexcel_xls\xls.py", line 156, in set_sheet_name
self._native_sheet = self._native_book.add_sheet(name)
File "C:\Python27\lib\site-packages\xlwt\Workbook.py", line 368, in add_sheet
raise Exception("invalid worksheet name %r" % sheetname)
Exception: invalid worksheet name u'product list - week.csv'
[Finished in 0.3s with exit code 1]
我尝试在C源文件中使用vimbuff 所以我做了(如果我可以打印,无论如何我都可以使用它。)
...
. = ALIGN(16777216);
.vimbuffs : {
*(.vimbuffs)
}
vimbuffs = .;
...
从地图文件中,我可以看到vimbufs被分配给0x3b3f6000,这是正确的,我想让它对齐。但是当运行程序并打印值时,我看到了
extern unsigned int vimbuffs; // from linker script
printf("vimbuffs = %x\n", vimbuffs);
有什么问题?