完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电子发烧友论坛|
PIC18F67 K22编译器XC8 V1.43ID-MPLAB XV 4.01i刚从C18编译器切换到XC8,遇到了与HTTP服务器程序相关的MPFS操作。这是在重复使用以前用C18运行的一些HTTP程序时发生的。ROCPLACK读取文件系统(目录和文件)并创建相应的“MPFSIVIGE2.C”文件,并将其编译成程序,该文件是由一系列数组组成的FAT文件系统的映像,每一个最大字节为1024字节,它们应该被编译和链接。在源文件中,它们之间没有相同的顺序,因此它们可以由指针来处理,就像它是一个单独的大数组一样。C18没有问题:所有这些数组都被编译、链接和存储在ROM中。IXXC8发现数组不是按顺序存储的。XC8决定将每个数组按其自身的规则放置在程序存储器中。这扰乱了MPFS操作。例如:我有这四个数组:ROM UIT88T MPFSSTART[O] ROM UIT88T MPFSSY 00000 1 [] ROM UIT88T MPFSX 00000 2 [] ROM UIT88T MPFSH 00000 3 [],我需要它们在ROM存储器中链接。以上顺序和无间隙。我怎样才能强制XC8以正确的顺序存储数组(同时仍然保留可重定位性)?谢谢
以上来自于百度翻译 以下为原文 PIC18F67K22 Compiler XC8 V1.43 Ide MPLAB X V 4.01 I just switched from the C18 compiler to XC8 and encountered a problem with MPFS operation in relation with HTTP server programs. This happened while reusing some HTTP programs I had previously running with C18. A tool called MPFS2.jar is provided by Microchip to read a file system (directories and files) and create a corresponding “mpfs_image2.c” file to be compiled and linked into the program. This file is the image of a FAT file system made up of a sequence of arrays, each of max 1024 bytes, which are supposed to be compiled and linked with no gaps in between and in the same order they appear in the source file so they can be addressed by a pointer just as it were a single big array. With C18 there were no problems: all those arrays were compiled, linked and stored in ROM perfectly aligned one after the other in the correct sequence. . With XC8 I found that the arrays are not stored in sequence. XC8 decides where to place each array in program memory according to its own rules. This disrupts MPFS operation. For instance: I have these four arrays: ROM uint8_t MPFS_Start[] ROM uint8_t MPFS_000001[] ROM uint8_t MPFS_000002[] ROM uint8_t MPFS_000003[] and I need have them linked in rom memory in the above order and with no gaps. How can I force XC8 to store the arrays in the correct sequence (while still preserving relocatability)? Thanks |
|
相关推荐
19个回答
|
|
|
|
|
|
|
|
|
+1并检查“ROM”的定义。它应该只是XC8中的“const”。
以上来自于百度翻译 以下为原文 +1 and check what "ROM" is defined to. It should just be "const" in XC8. |
|
|
|
|
|
如果您的配置允许ROM阵列超过1 KB:合并部件。根据您的描述,LyMyfsSt*[]被引用过。因此,“没有人”会抱怨其他标签丢失。
以上来自于百度翻译 以下为原文 If your configuration allows for ROM arrays beyond 1 kB: merge the parts. According to your description only MPFS_Start[] is ever referred to. Thus "nobody" will complain about the other labels missing. |
|
|
|
|
|
自第一个C标准发布以来(实际上,自从1988和K&AMP R2)以来,用这个假设编写代码是一个很大的错误。这是一个简单的逻辑:语言提供了结构和数组,用于在数据项集合上执行存储顺序。因此,任何数据项都不在一个单独的项中。结构或数组没有定义的相对排序。
以上来自于百度翻译 以下为原文 Writing code with this assumption has been a big error since 1989 when the first C standard was published (in fact, since 1988 and K&R2). It's simple logic: The language provides structures and arrays for enforcing order of storage on collections of data items. Thus, any data items not in a single structure or array have no defined relative ordering. |
|
|
|
|
|
你完全正确。但是如何应付不支持“更大”变量的CS/编译器,这是由于“奇怪”的寻址模式和不成熟的编译器造成的限制?(没有太多的批评者打算:)
以上来自于百度翻译 以下为原文 @ mlp You're absolutely right. But how to cope with µCs/compilers that do not support "bigger" variables due to limitations caused by "weird" addressing modes and immature compilers? (Not too much critics intended :) ) |
|
|
|
|
|
很好的建议。我确实创建了一个结构,事实上数组是按正确的顺序连接的。[&字体;]当我做了下列操作时:[& lt;字体] const结构{{ROM UIT88T MPFSx启动[R] 1024;ROM UIT88T MPFSH 00000 1 [1024 ] };ROM UIT88T MPFSX 00000 2 [1024 ] };ROM UIT88T MPFSS00000 3 3 [1“67”};} MPFSx数组;[/lt;字体],编译器是高兴的,数组似乎按正确的顺序链接。[&字体;]当我试图用宏定义初始化数组时,例如[[lt;Frave]字体]定义DATAUUNKOXXX0x45,0x51,(等),除了最后一个以外,每个字节的总长度为1024个字节。RoUn88T MPFSKEST[O]={DATCHUNKOFUN900};ROM UIT88T MPFSH 00000 1 []{DATCHUNKO09000};ROM UIT88T MPFSX 00000 2 []=DATACUNKO090002};ROM UIT88T MPFSK 00000 3 [] {DATAUUNKO09000};} MPFSHOLL数组;[/lt;Frand ],然后编译器抛出一般错误,如:[ft;fon;fon这是167)(63)错误:(314)“”;“预期的[/lt;字体] .. /源代码/MPFSXIMG2.c:63:警告:(374)缺少基本类型;int假设[&字体;字体]作为一种选择,我也尝试:[R&字体] ROM UINT88T MPFSXSTART[] = {DATACUNUNK00,DATAUUNK0000 01,DATAUUNK00 0 02,DATAUUNK00 0 003 };最后,通过使用不同大小的数组,我得到了这个错误信息:“DATAUUNKO9000::78:Error:(153)在预处理器宏“DATAUUNKUMFN”参数扩展中的“空间”[[lt;Ford] ],通过进一步的实验,我发现宏E。Cx8中的xPANTION被限制为2000字节。[{lt;字体]意味着{DATAUUNUNK00,DATAUUNKO010000,DATAUUNK000 02,DATAUKUNK09000}不能大于2000字节。[R&Lt:Frand ],因此我删除了DATAUNKS中数组的细分,因为它是由MPFS.JAR实用程序输出并合并T的。哼成一个单独的长数组,我存储在:[lt;字体] ROM UIT88T MPFSXSTART[] = {0x4d,0x50.0x460x53.0x02.0x01,-gt等,直到3000个字节以上;[&字体;]没有解决这个问题,因为显然XC8中的预处理器不接受初始化超过2000个字节的AltoTest.呃。同样,没有运气。[字体]作为一个交叉检查,当我把总数减少到小于2000的模块时,这个模块被完美地编译了。[&字体]我尝试过:[&字体;const结构] {ROM UIT88T MPFS} 000000 []={0x4d,0x50,0x46,0x53,-gt等等。总共1024字节};ROM UIT88T。0d、0x0a、-gt等共计1024字节;ROM Unt8St*MPFSx 00000 2 []={0x3D,0x22,0x63.0x65,-gt等;共计1024字节};ROM UIT88T MPFSH 00000 3 []=0x20,0x20,0x20,0x3c,-gt等;共计167字节};MPFSI 00000 1 [] = {0x25,0x3b,0x.([l]字体)[/lt;字体] ./Orths/MPfsI.img2.c:63:错误:(“314”);“预期[/lt;字体] .. /源/MPFSI.img2.c:63:警告:(374)缺少基本类型;int假定[&字体;显然]做这项工作的唯一方法是创建单独的数组(不是结构的一部分)并具有它们链接在一个无缝链中,或者创建一组工作函数集,使各种数组看起来好像是一个唯一的大数组。[&字体]我很害怕这个观点。[lt;Ford] @ MLP:我完全同意这个概念,尽管DU000 00 01指出可能有一些情况。其中一些编译器可能需要解决问题。这可能是其中的一个例子。你能确认我的发现吗?我错过什么了吗?我哪里错了?我正在附加包含实际数据流的原始MPFS图像文件。
以上来自于百度翻译 以下为原文 [ [ [ [ [ const struct { ROM uint8_t MPFS_Start[1024]; ROM uint8_t MPFS_000001[1024] }; ROM uint8_t MPFS_000002[1024]}; ROM uint8_t MPFS_000003[167]}; }MPFS_Array; [ [ [ [ const stuct { ROM uint8_t MPFS_Start[] = {DATACHUNK000000}; ROM uint8_t MPFS_000001[] = {DATACHUNK000001}; ROM uint8_t MPFS_000002[] = {DATACHUNK000002}; ROM uint8_t MPFS_000003[] = {DATACHUNK000003}; }MPFS_Array; [ [ [ [ [ [ [ [ [ [ [ etc. up to more than 3000 bytes }; [ [ [ [ const struct { ROM uint8_t MPFS_000000[ ] = {0x4d,0x50,0x46,0x53,-> etc. total 1024 bytes }; ROM uint8_t MPFS_000001[ ] = {0x25,0x3b,0x0d,0x0a,-> etc. total 1024 bytes }; ROM uint8_t MPFS_000002[ ] = {0x3d,0x22,0x63,0x65,-> etc. total 1024 bytes }; ROM uint8_t MPFS_000003[ ] = {0x20,0x20,0x20,0x3c,-> etc. total 167 bytes }; }MPFS_Array; const void * const MPFS_Start = MPFS_Array.MPFS_000000; [ [ [ [ [ [ [ [ [ |
|
|
|
|
|
你不能把数组初始化放在结构定义里面,你必须把它放在外面。这样的事情:你可能也必须声明数组大小。
以上来自于百度翻译 以下为原文 You cannot put the array initialisation inside the structure definition, you have to put it outside. Something like this: const struct { ROM uint8_t MPFS_Start[]; ROM uint8_t MPFS_000001[]; ROM uint8_t MPFS_000002[]; ROM uint8_t MPFS_000003[] ; }MPFS_Array = { {DATACHUNK000000}, {DATACHUNK000001}, {DATACHUNK000002}, {DATACHUNK000002} }; You might have to declare the array sizes as well. |
|
|
|
|
|
对不起,我刚才测试了一个错误序列:….. /源/ MPFSXIMG2.C:284:警告:(374)缺少基本类型;int假设….. /源/ MPFSx img2.c:284:错误:(314);“….. /Soal/MPfsIIG2.2. C:284:警告:(374)缺少基本类型;int假设./Orths/MPFSIIMG2.c:284:错误:(314)(284)警告:(374)缺少基本类型;int假设….. /源/ MPFSI.IMG2.c:284:错误:(…);预期的./Orths/MPFSIIG2.2. C:284:警告:(374)缺少基本类型;int假设….. /源/ MPFSIIG2.2. C:284:错误:(“…”;预期的…/Strut/MPFSIIMG2.c:284:警告:(374)缺少基本类型;int假设./Objs/MPFsIIG2.c: 284;错误:“……/Objest/MPFSIIG2.2. C:284:警告:(374)缺少基本类型;int假设….. /源/ MPFSXIMG2.c:284:警告:(369)不支持的符号位…./MPES/MPFSXIMG2.c:284:错误:(314)“…;”源/MPF。SyIMG2.C: 284:警告:(374)缺少基本类型;int假设…./Fask/MPfsIimg2.c:284:警告:(369)不支持的符号位…./MFSsIIIMG2. C:284:错误:(265)整数常量预期.. ./Objest/MPFSIIG2.2. C:284:错误:(“…..”/Objest/MPFSIIG2.2.C:284:错误:(194)“”)“预期”ED./Fask/MPFSIIG2.2. C:284:警告:(374)假设….. /源/ MPFSI.IMG2. C:284:错误:(…);预期的./Orths/MPFSI.IMG2. C:284:警告:(374)缺少基本类型;int假设….. /源/ MPFSIIG2.2. C:284:错误:(…);预期的…/Posivs/MPFSIIMG2.C:284:警告:(374)MISSI(284)错误:(314)“..”;“源”/MPFSI.IMG2. C:284:警告:(374)缺少基本类型;int假设….. /源/ MPFSXIMG2. C:285:错误:(“……”预期…./Objs/MPFSIIMG2.c:285:警告:(374)缺少基本类型;int假设…/Strut/MPFSIIMG2.c:2:85:错误:(314)“……/源代码/MPFSXIMG2.C:285:警告:(374)缺少基本类型;int假设…./Fask/MPFSXIMG2.c:285:错误:(“……”……/Soal/MPfsIimg2.c:285:警告:(374)缺少基本类型;int假设….. /源代码/MPFSXIMG2.c:285:错误:(261)结构/联合成员“源”红色错误:(261)Strut/Union成员“源”重新定义./Orths/MPFSIIG2.2. C:285:错误:(“…”;预期的./Orths/MPFSIIG2.2. C:285:警告:(374)缺少基本类型;int假设….. /源代码/MPFSXIMG2.c:285:错误:(261)结构/联合成员“MPFSIIMG2”重新定义…/源代码/MPMPsIIG2.2. C:285:错误:(261)结构/成员“MPFSXIMG2”重新定义./Orths/MPFSXIMG2.C:285:咨询:(1)太多错误(21):***[构建/默认/生产/ /XP/812168374 /MPFSI- IMG2.P1]错误1(908)退出状态=1NbPosi/MaFaMeCurrase.MK:626:目标“构建/默认/ PRODU”配方CTiO/XEX/812168374/MPFSIIMG2.P1’失败
以上来自于百度翻译 以下为原文 Sorry, I just tested it: const struct { ROM uint8_t MPFS_Start[]; ROM uint8_t MPFS_000001[]; ROM uint8_t MPFS_000002[]; ROM uint8_t MPFS_000003[]; }MPFS_Array = = {{DATACHUNK000000}, {DATACHUNK000001}, {DATACHUNK000002}, {DATACHUNK000003}}; Result a sequence of errors including: ../source/mpfs_img2.c:284: warning: (374) missing basic type; int assumed ../source/mpfs_img2.c:284: error: (314) ";" expected ../source/mpfs_img2.c:284: warning: (374) missing basic type; int assumed ../source/mpfs_img2.c:284: error: (314) ";" expected ../source/mpfs_img2.c:284: warning: (374) missing basic type; int assumed ../source/mpfs_img2.c:284: error: (314) ";" expected ../source/mpfs_img2.c:284: warning: (374) missing basic type; int assumed ../source/mpfs_img2.c:284: error: (314) ";" expected ../source/mpfs_img2.c:284: warning: (374) missing basic type; int assumed ../source/mpfs_img2.c:284: error: (314) ";" expected ../source/mpfs_img2.c:284: warning: (374) missing basic type; int assumed ../source/mpfs_img2.c:284: warning: (369) signed bitfields not supported ../source/mpfs_img2.c:284: error: (314) ";" expected ../source/mpfs_img2.c:284: warning: (374) missing basic type; int assumed ../source/mpfs_img2.c:284: warning: (369) signed bitfields not supported ../source/mpfs_img2.c:284: error: (265) integer constant expected ../source/mpfs_img2.c:284: error: (314) ";" expected ../source/mpfs_img2.c:284: error: (194) ")" expected ../source/mpfs_img2.c:284: warning: (374) missing basic type; int assumed ../source/mpfs_img2.c:284: error: (314) ";" expected ../source/mpfs_img2.c:284: warning: (374) missing basic type; int assumed ../source/mpfs_img2.c:284: error: (314) ";" expected ../source/mpfs_img2.c:284: warning: (374) missing basic type; int assumed ../source/mpfs_img2.c:284: error: (314) ";" expected ../source/mpfs_img2.c:284: warning: (374) missing basic type; int assumed ../source/mpfs_img2.c:285: error: (314) ";" expected ../source/mpfs_img2.c:285: warning: (374) missing basic type; int assumed ../source/mpfs_img2.c:285: error: (314) ";" expected ../source/mpfs_img2.c:285: warning: (374) missing basic type; int assumed ../source/mpfs_img2.c:285: error: (314) ";" expected ../source/mpfs_img2.c:285: warning: (374) missing basic type; int assumed ../source/mpfs_img2.c:285: error: (261) struct/union member "source" redefined ../source/mpfs_img2.c:285: error: (261) struct/union member "source" redefined ../source/mpfs_img2.c:285: error: (314) ";" expected ../source/mpfs_img2.c:285: warning: (374) missing basic type; int assumed ../source/mpfs_img2.c:285: error: (261) struct/union member "mpfs_img2" redefined ../source/mpfs_img2.c:285: error: (261) struct/union member "mpfs_img2" redefined ../source/mpfs_img2.c:285: advisory: (1) too many errors (21) make: *** [build/default/production/_ext/812168374/mpfs_img2.p1] Error 1 (908) exit status = 1 nbproject/Makefile-default.mk:626: recipe for target 'build/default/production/_ext/812168374/mpfs_img2.p1' failed Attachment(s) mpfs_img2.c (24.95 KB) - downloaded 57 times |
|
|
|
|
|
你在内嵌的代码中有一个双等式。你所附的文件根本不包含那个代码。
以上来自于百度翻译 以下为原文 There's a double equals in the code you posted inline. The file you attached doesn't contain that code at all. |
|
|
|
|
|
真傻!您已经知道DATAUUNK00 *由于超过2K字节而不能工作!但原则适用:将工作。如果您不添加TyPOS,那么在MLA中复制初始化代码应该很容易,因为多行初始化没有问题(与宏定义相反)。请注意,每个{中的最后一个元素。…}可能没有尾随逗号!
以上来自于百度翻译 以下为原文 Silly! You already know that the DATACHUNK00* does not work due to exceeding 2kBytes! But the principles applies: const struct { ... } MPFS_array = { {0x01, 0x02, ..., 0xef }, {0x01, 0x00, ..., 0xfe }, { ... }, { ... } };will work. Provided you do not add typos. It should be easy to copy the initialization code from the MLA as multi-line initialization is no problem (as opposed to macro definitions). Be aware that the last element in each { . . . } may not have a trailing comma! |
|
|
|
|
|
定义了DATAUUNKO010000 0x45、0x51、0x45、0x51、0x45、0x51、0x45、0x51、0x45、0x51,定义DATAUUNK09000x0x45、0x51、0x45、0x51、0x45、0x51、0x45、0x51、0x45、0x51定义DATACUNK000 03 0x45、0x51、0x45、0x51。尝试:*定义DATACHUNKFAMON0x45,0x51,0x45,0x51,0x45,0x51,0x51,0x51,0x45,0x51康斯特结构{UIT88T MPFSXSTART[];UTI88T MPFSH 00000 1 [];UIT88T MPFSH 00000 00000 [];UIT88T MPFSH 00000 3 [];} MPFSx数组={{DATAUUNK100MAM},{DATAUUNKO09000},{DATAUUNKO09000},{DATAUUNKO09000}};
以上来自于百度翻译 以下为原文 try: #define DATACHUNK000000 0x45, 0x51, 0x45, 0x51, 0x45, 0x51, 0x45, 0x51, 0x45, 0x51 #define DATACHUNK000001 0x45, 0x51, 0x45, 0x51, 0x45, 0x51, 0x45, 0x51, 0x45, 0x51 #define DATACHUNK000002 0x45, 0x51, 0x45, 0x51, 0x45, 0x51, 0x45, 0x51, 0x45, 0x51 #define DATACHUNK000003 0x45, 0x51, 0x45, 0x51, 0x45, 0x51, 0x45, 0x51, 0x45, 0x51 const struct { uint8_t MPFS_Start[]; uint8_t MPFS_000001[]; uint8_t MPFS_000002[]; uint8_t MPFS_000003[]; }MPFS_Array = {{DATACHUNK000000},{DATACHUNK000001},{DATACHUNK000002},{DATACHUNK000003}}; |
|
|
|
|
|
对不起,双倍均等是我在发布代码时犯的错误。实际测试是用正确的代码完成的。我所做的文件包括Microchip的MPFSJAR实用程序的原始未被触摸输出,而不是我用于上述测试的代码。我在这里附上我用于测试的修改版本。你可以尝试编译。@ 0000000 1:我已经做了这样的测试,正如我在我之前的一篇文章中所说:“所以我在DaCununk中删除数组,因为它是由MPFS.JAR工具输出的,并把它们合并成一个单独的长数组,我存储在:ROM UIT88T MPFSXSTART[] = {0x4D)中。,0x50、0x46、0x53.0x02.0x01、-gt等高达3000个字节以上;这并不能解决问题,因为显然XC8中的预处理器不接受初始化2000个字节以上的全部。同样没有运气。“为了完整性,但没有什么希望,我将尝试用数组和没有宏的结构编译。我将报告。
以上来自于百度翻译 以下为原文 @qhb: Sorry, the double equal was my mistake while transcribing the code for posting. The actual test was done using the correct code. The file I did include is the original untouched output of the MPFS.jar utility by Microchip, not the code I used for the above test. I am sorry I created some confusion. I am here attaching the modified version I used for the test. You can try compiling. @00000001: I already made such test, as I stated in one of my previous posts: "So I resorted to remove the subdivision of the array in DATACHUNKS as it was output by the MPFS.jar utility and merged them into a single long array which I stored in: ROM uint8_t MPFS_Start[ ] = {0x4d,0x50,0x46,0x53,0x02,0x01,-> etc. up to more than 3000 bytes }; This did not solve the problem because apparently the preprocessor in XC8 does not accept to initialize more than 2000 bytes altogether. Again no luck." For the sake of completeness, but with little hope, I am going to try to compile with the structure of arrays and without macros. I will report. Attachment(s) mpfs_img2.c (24.98 KB) - downloaded 65 times |
|
|
|
|
|
我的最新实验是(如000000建议的1)尝试在不使用宏的情况下初始化结构。只有当数组的总长度限制为2000字节时,它才起作用。您可以尝试编译:.. /源代码/MPFSI.img2.c:67:警告:(228)非法字符(0xb)./Objs/MPFSI.img2.c:67:错误:(195)表达式语法…/Survivs/MPFSXIMG2.c:68:错误:(314)“”;如果您从中删除足够数量的行,则会看到它编译。在XC8中无法用超过2000字节初始化一个const数组(在闪存中)。
以上来自于百度翻译 以下为原文 My latest experiment was (as 0000001 suggested) to try initializing the structure without using macros. It does work only if the total length of the array is limited to 2000 bytes. I am attaching the test c file I used. You can try compiling and you will see: ../source/mpfs_img2 .c:67: warning: (228) illegal character (0xB) ../source/mpfs_img2 .c:67: error: (195) expression syntax ../source/mpfs_img2 .c:68: error: (314) ";" expected If you remove a sufficient number of lines from it you will see it compiles. Apparently there is no way in XC8 to initialize a const array (in flash memory) with more than 2000 bytes. Attachment(s) mpfs_img2 - Test.c (24.72 KB) - downloaded 61 times |
|
|
|
|
|
看来你必须放弃可重新定位,并使用绝对地址为每一个数组。无论如何,提交一张票到Microchip关于这个限制。
以上来自于百度翻译 以下为原文 |
|
|
|
|
|
“Paolo……不,你没有!(至少不完全是这样)。您试图同时初始化整个数组,而我的建议保留到4个结构成员,每个成员初始化最大1 kb。没有保证,但值得一试。如果这不起作用,在C代码级别上不可能做到这一点,您将不得不篡改TH。E链接器控件和文档。
以上来自于百度翻译 以下为原文 @ Paolo... NO, YOU DID NOT! (At least not exactly.) You tried to initialize the whole array at once, while my proposal keeps to the 4 struct members, initializing max. 1 kB per member. No warranty for this, but worth a try. If this does not work, it is impossible to do this on the C code level and you will have to fiddle with the linker controls and the documentation. |
|
|
|
|
|
@从我以前的帖子@ 0000000:结果与往常一样:./Orths/MPFSIIG2.2. C:63:错误:(314)“;”预期.. /MPES/MPFSIIG2.2. C:63:警告:(374)缺少基本类型;int表示这是什么意思?否则,请澄清你的建议。我会努力实现它。
以上来自于百度翻译 以下为原文 @00000001 From a previous post of mine: const struct { ROM uint8_t MPFS_000000[ ] = {0x4d,0x50,0x46,0x53,-> etc. total 1024 bytes }; ROM uint8_t MPFS_000001[ ] = {0x25,0x3b,0x0d,0x0a,-> etc. total 1024 bytes }; ROM uint8_t MPFS_000002[ ] = {0x3d,0x22,0x63,0x65,-> etc. total 1024 bytes }; ROM uint8_t MPFS_000003[ ] = {0x20,0x20,0x20,0x3c,-> etc. total 167 bytes }; }MPFS_Array; const void * const MPFS_Start = MPFS_Array.MPFS_000000; The result was as usual: ../source/mpfs_img2.c:63: error: (314) ";" expected ../source/mpfs_img2.c:63: warning: (374) missing basic type; int assumed Is this what you meant? Otherwise please clarify your suggestion. I will try to implement it. |
|
|
|
|
|
您已经被告知不能将初始化放在结构定义内。请去掉宏定义并尝试将数据直接放在那里,如POST 11和12中所示。
以上来自于百度翻译 以下为原文 You've already been told you can not put the initialisation inside the structure definition. Get rid of the macro definition and try putting the data directly in there, as shown in posts 11 & 12. |
|
|
|
|
|
这不是我建议的!见我的帖子。初始化必须遵循在我的帖子中描述的形式的结构定义(第10条-如果我算正确)。在我的平板电脑上很难提供整个代码序列,但到目前为止应该是清楚的。包括二级卷曲包围。
以上来自于百度翻译 以下为原文 THIS IS NOT WHAT I SUGGESTED ! See my post. The initialization has to follow the struct definition in the form described in my post (#10 - if I count correctly). On my tablet it is very difficult to provide the whole code sequence, but it should be clear so far. Including the 2-level curly bracketing. |
|
|
|
|
|
我在发布以前的帖子之前尝试过这个。它失败并吐出一个“P1.EXE已经停止工作”。我最多可以得到XC8无错误初始化为2018字节。
以上来自于百度翻译 以下为原文 I tried this const struct { uint8_t MPFS_Start[]; uint8_t MPFS_000001[]; uint8_t MPFS_000002[]; uint8_t MPFS_000003[]; } MPFS_Array = {{DATACHUNK000000}, {DATACHUNK000001}, {DATACHUNK000002}, {DATACHUNK000003}}; before posting my previous post. It fails and vomits a "p1.exe has stopped working." The most I can get XC8 to initialize without error is 2018 bytes. |
|
|
|
|
只有小组成员才能发言,加入小组>>
MPLAB X IDE V6.25版本怎么对bootloader和应用程序进行烧录
473 浏览 0 评论
5793 浏览 9 评论
2334 浏览 8 评论
2224 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3530 浏览 3 评论
1122浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
1095浏览 1评论
我是Microchip 的代理商,有PIC16F1829T-I/SS 技术问题可以咨询我,微信:A-chip-Ti
873浏览 1评论
MPLAB X IDE V6.25版本怎么对bootloader和应用程序进行烧录
475浏览 0评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-1 23:44 , Processed in 1.104795 second(s), Total 108, Slave 91 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
1304