I think you missed my announcement. It is already in the latest revision. I still need to document it though. Use --model-huge and all functions will be banked including the library (except some lowest level helper functions). The library therefor must also be build with this switch.
Maarten > Hi Maarten, I was wondering how are you progressing on the huge memory > model? > > I have been using the banked features pretty extensively but the > requirement to explicitly mark code banked has limited what code I can > move into the non-default banks. I would love if there was a way to > make this all much more flexible. > > a* > > Anthony Asterisk wrote: > > Thanks Maarten, your fix has helped! I look forward to your full > > release. Let me know if you need any assistance with testing. > > > > Anthony > > > > Maarten Brock wrote: > >> No, not quite. This is where it should be: > >> > >> if (IFFUNC_ISREENT (name->type) || options.stackAuto) > >> { > >> if (options.useXstack) > >> xstackPtr -= port->stack.direction * port->stack.reent_overhead; > >> else > >> stackPtr -= port->stack.direction * port->stack.reent_overhead; > >> } > >> > >> if (IFFUNC_ISBANKEDCALL (name->type)) > >> stackPtr -= port->stack.direction * port->stack.banked_overhead; > >> > >> fetype = getSpec (name->type); /* get the specifier for the > >> function */ > >> /* if this is a reentrant function then */ > >> if (IFFUNC_ISREENT (name->type)) > >> reentrant++; > >> > >> > >> > >> > >>> Hi Maarten. I'm not sure my line numbers line up with your. I'm pretty > >>> sure I got the correct location in mcs51/main.c, but the change is > >>> SDCCCast might be different. Does this look good to you? > >>> > >>> > >>> if (options.dump_tree) > >>> PA(ex); > >>> if (fatalError) > >>> goto skipall; > >>> > >>> * if (IFFUNC_ISBANKEDCALL (name->type)) > >>> stackPtr -= port->stack.direction * port->stack.banked_overhead; > >>> > >>> * > >>> /* Do not generate code for inline functions unless extern also. */ > >>> #if 0 > >>> if (FUNC_ISINLINE (name->type)&& !IS_EXTERN (fetype)) > >>> goto skipall; > >>> #else > >>> /* Temporary hack: always generate code for static inline functions. > >>> */ > >>> /* Ideally static inline functions should only be generated if > >>> needed. */ > >>> if (FUNC_ISINLINE (name->type)&& !IS_EXTERN (fetype)&& !IS_STATIC > >>> (fetype)) > >>> goto skipall; > >>> #endif > >>> > >>> > >>> Maarten Brock wrote: > >>> > >>>> Anthony, > >>>> > >>>> I think I've found the bug. > >>>> > >>>> In mcs51/main.c(795) banked_overhead should be set to 1. > >>>> And in SDCCast.c(6514) the following should be added: > >>>> if (IFFUNC_ISBANKEDCALL (name->type)) > >>>> stackPtr -= port->stack.direction * port->stack.banked_overhead; > >>>> > >>>> When I fully have --model-huge working I'll commit ot svn. > >>>> > >>>> Greets, > >>>> Maarten > >>>> > >>>> > >>>> > >>>>> Hi Maarten, > >>>>> > >>>>> any other way I can help narrow down the cause of this issue? > >>>>> > >>>>> a* > >>>>> > >>>>> Anthony Asterisk wrote: > >>>>> > >>>>> > >>>>>>> Indeed, no .rst for library objects. But maybe you could > >>>>>>> link the object explicitly to override the library and > >>>>>>> this will generate the .rst file. That is assuming you > >>>>>>> have built the library first from source. > >>>>>>> > >>>>>>> Maarten > >>>>>>> > >>>>>>> > >>>>>> Yep can do that. > >>>>>> > >>>>>> program output: > >>>>>> sending 2d bytes. > >>>>>> payload addr X:0xe0a0. > >>>>>> SP 72. > >>>>>> sending ff00 bytes. > >>>>>> payload addr X:0xe0a0. > >>>>>> SP 78. > >>>>>> > >>>>>> > >>>>>> rst file excerpts > >>>>>> > >>>>>> > >>>>>> 1047 > >>>>>> ;------------------------------------------------------------ > >>>>>> 1048 ;Allocation info for local variables > >>>>>> in function 'cc2430_rf_send' > >>>>>> 1049 > >>>>>> ;------------------------------------------------------------ > >>>>>> 1050 ;payload_len Allocated > >>>>>> to stack - offset -4 > >>>>>> 1051 ;payload Allocated > >>>>>> to registers r2 r3 r4 > >>>>>> 1052 > >>>>>> ;------------------------------------------------------------ > >>>>>> 1053 ; > >>>>>> ../../cpu/cc2430/dev/cc2430_rf_intr.c:128: cc2430_rf_send(void > >>>>>> *payload, unsigned short payload_len) > >>>>>> 1054 ; > >>>>>> ----------------------------------------- > >>>>>> 1055 ; function cc2430_rf_send > >>>>>> 1056 ; > >>>>>> ----------------------------------------- > >>>>>> 0468 1057 _cc2430_rf_send: > >>>>>> 0468 C0 09 1058 push _bp > >>>>>> 046A 85 81 09 1059 mov _bp,sp > >>>>>> 046D AA 82 1060 mov r2,dpl > >>>>>> 046F AB 83 1061 mov r3,dph > >>>>>> 0471 AC F0 1062 mov r4,b > >>>>>> 1063 ; > >>>>>> ../../cpu/cc2430/dev/cc2430_rf_intr.c:130: printf("sending %x > >>>>>> bytes.\n",payload_len); > >>>>>> 0473 C0 02 1064 push ar2 > >>>>>> 0475 C0 03 1065 push ar3 > >>>>>> 0477 C0 04 1066 push ar4 > >>>>>> 0479 E5 09 1067 mov a,_bp > >>>>>> 047B 24 FC 1068 add a,#0xfc > >>>>>> 047D F8 1069 mov r0,a > >>>>>> 047E E6 1070 mov a,@r0 > >>>>>> 047F C0 E0 1071 push acc > >>>>>> 0481 08 1072 inc r0 > >>>>>> 0482 E6 1073 mov a,@r0 > >>>>>> 0483 C0 E0 1074 push acc > >>>>>> > >>>>>> 0485 74 C1 1075 mov a,#__str_0 > >>>>>> 0487 C0 E0 1076 push acc > >>>>>> 0489 74 7C 1077 mov a,#(__str_0>> 8) > >>>>>> 048B C0 E0 1078 push acc > >>>>>> 048D 74 80 1079 mov a,#0x80 > >>>>>> 048F C0 E0 1080 push acc > >>>>>> 0491 12 3D 15 1081 lcall _printf > >>>>>> 0494 E5 81 1082 mov a,sp > >>>>>> 0496 24 FB 1083 add a,#0xfb > >>>>>> 0498 F5 81 1084 mov sp,a > >>>>>> 049A D0 04 1085 pop ar4 > >>>>>> 049C D0 03 1086 pop ar3 > >>>>>> 049E D0 02 1087 pop ar2 > >>>>>> 1088 ; > >>>>>> ../../cpu/cc2430/dev/cc2430_rf_intr.c:131: printf("payload addr > >>>>>> %p.\n", payload); > >>>>>> 04A0 C0 02 1089 push ar2 > >>>>>> 04A2 C0 03 1090 push ar3 > >>>>>> 04A4 C0 04 1091 push ar4 > >>>>>> 04A6 C0 02 1092 push ar2 > >>>>>> 04A8 C0 03 1093 push ar3 > >>>>>> 04AA C0 04 1094 push ar4 > >>>>>> 04AC 74 D4 1095 mov a,#__str_1 > >>>>>> 04AE C0 E0 1096 push acc > >>>>>> 04B0 74 7C 1097 mov a,#(__str_1>> 8) > >>>>>> 04B2 C0 E0 1098 push acc > >>>>>> 04B4 74 80 1099 mov a,#0x80 > >>>>>> 04B6 C0 E0 1100 push acc > >>>>>> 04B8 12 3D 15 1101 lcall _printf > >>>>>> 04BB E5 81 1102 mov a,sp > >>>>>> 04BD 24 FA 1103 add a,#0xfa > >>>>>> > >>>>>> 04BF F5 81 1104 mov sp,a > >>>>>> 1105 ; > >>>>>> ../../cpu/cc2430/dev/cc2430_rf_intr.c:132: printf("SP %x.\n", SP); > >>>>>> 04C1 AD 81 1106 mov r5,_SP > >>>>>> 04C3 7E 00 1107 mov r6,#0x00 > >>>>>> 04C5 C0 05 1108 push ar5 > >>>>>> 04C7 C0 06 1109 push ar6 > >>>>>> 04C9 74 E6 1110 mov a,#__str_2 > >>>>>> 04CB C0 E0 1111 push acc > >>>>>> 04CD 74 7C 1112 mov a,#(__str_2>> 8) > >>>>>> 04CF C0 E0 1113 push acc > >>>>>> 04D1 74 80 1114 mov a,#0x80 > >>>>>> 04D3 C0 E0 1115 push acc > >>>>>> 04D5 12 3D 15 1116 lcall _printf > >>>>>> 04D8 E5 81 1117 mov a,sp > >>>>>> 04DA 24 FB 1118 add a,#0xfb > >>>>>> 04DC F5 81 1119 mov sp,a > >>>>>> 04DE D0 04 1120 pop ar4 > >>>>>> 04E0 D0 03 1121 pop ar3 > >>>>>> 04E2 D0 02 1122 pop ar2 > >>>>>> 1123 ; > >>>>>> ../../cpu/cc2430/dev/cc2430_rf_intr.c:133: return > >>>>>> cc2430_rf_send_b(payload, payload_len); > >>>>>> 04E4 E5 09 1124 mov a,_bp > >>>>>> 04E6 24 FC 1125 add a,#0xfc > >>>>>> 04E8 F8 1126 mov r0,a > >>>>>> 04E9 E6 1127 mov a,@r0 > >>>>>> 04EA C0 E0 1128 push acc > >>>>>> 04EC 08 1129 inc r0 > >>>>>> 04ED E6 1130 mov a,@r0 > >>>>>> 04EE C0 E0 1131 push acc > >>>>>> 04F0 8A 82 1132 mov dpl,r2 > >>>>>> 04F2 8B 83 1133 mov dph,r3 > >>>>>> 04F4 8C F0 1134 mov b,r4 > >>>>>> 04F6 78 8D 1135 mov r0,#_cc2430_rf_send_b > >>>>>> 04F8 79 82 1136 mov > >>>>>> r1,#(_cc2430_rf_send_b > >>>>>> > >>>>>> > >>>>>>>> 8) > >>>>>>>> > >>>>>>>> > >>>>>> 04FA 7A 02 1137 mov > >>>>>> r2,#(_cc2430_rf_send_b > >>>>>> > >>>>>> > >>>>>>>> 16) > >>>>>>>> > >>>>>>>> > >>>>>> 04FC 12 06 27 1138 lcall __sdcc_banked_call > >>>>>> 04FF AA 82 1139 mov r2,dpl > >>>>>> 0501 AB 83 1140 mov r3,dph > >>>>>> 0503 15 81 1141 dec sp > >>>>>> 0505 15 81 1142 dec sp > >>>>>> 0507 8A 82 1143 mov dpl,r2 > >>>>>> 0509 8B 83 1144 mov dph,r3 > >>>>>> 050B D0 09 1145 pop _bp > >>>>>> 050D 22 1146 ret > >>>>>> > >>>>>> 1115 > >>>>>> ;------------------------------------------------------------ > >>>>>> 1116 ;Allocation info for local variables > >>>>>> in function 'cc2430_rf_send_b' > >>>>>> 1117 > >>>>>> ;------------------------------------------------------------ > >>>>>> 1118 ;payload_len Allocated > >>>>>> to stack - offset -4 > >>>>>> 1119 ;payload Allocated > >>>>>> to stack - offset 1 > >>>>>> 1120 ;i Allocated > >>>>>> to registers r5 > >>>>>> 1121 ;counter Allocated > >>>>>> to registers r2 > >>>>>> 1122 > >>>>>> ;------------------------------------------------------------ > >>>>>> 1123 ; > >>>>>> ../../cpu/cc2430/dev/cc2430_rf.c:160: cc2430_rf_send_b(void *payload, > >>>>>> unsigned short payload_len) __banked > >>>>>> 1124 ; > >>>>>> ----------------------------------------- > >>>>>> 1125 ; function cc2430_rf_send_b > >>>>>> 1126 ; > >>>>>> ----------------------------------------- > >>>>>> 828D 1127 _cc2430_rf_send_b: > >>>>>> 828D C0 09 1128 push _bp > >>>>>> 828F 85 81 09 1129 mov _bp,sp > >>>>>> 8292 C0 82 1130 push dpl > >>>>>> 8294 C0 83 1131 push dph > >>>>>> 8296 C0 F0 1132 push b > >>>>>> 1133 ; > >>>>>> ../../cpu/cc2430/dev/cc2430_rf.c:164: printf("sending %x > >>>>>> bytes.\n",payload_len); > >>>>>> 8298 E5 09 1134 mov a,_bp > >>>>>> 829A 24 FC 1135 add a,#0xfc > >>>>>> 829C F8 1136 mov r0,a > >>>>>> 829D E6 1137 mov a,@r0 > >>>>>> 829E C0 E0 1138 push acc > >>>>>> 82A0 08 1139 inc r0 > >>>>>> 82A1 E6 1140 mov a,@r0 > >>>>>> 82A2 C0 E0 1141 push acc > >>>>>> 82A4 74 31 1142 mov a,#__str_2 > >>>>>> 82A6 C0 E0 1143 push acc > >>>>>> 82A8 74 7C 1144 mov a,#(__str_2>> 8) > >>>>>> 82AA C0 E0 1145 push acc > >>>>>> 82AC 74 80 1146 mov a,#0x80 > >>>>>> 82AE C0 E0 1147 push acc > >>>>>> 82B0 12 3D 15 1148 lcall _printf > >>>>>> 82B3 E5 81 1149 mov a,sp > >>>>>> 82B5 24 FB 1150 add a,#0xfb > >>>>>> 82B7 F5 81 1151 mov sp,a > >>>>>> 1152 ; > >>>>>> ../../cpu/cc2430/dev/cc2430_rf.c:165: printf("payload addr %p.\n", > >>>>>> payload); > >>>>>> 82B9 A8 09 1153 mov r0,_bp > >>>>>> 82BB 08 1154 inc r0 > >>>>>> 82BC E6 1155 mov a,@r0 > >>>>>> 82BD C0 E0 1156 push acc > >>>>>> 82BF 08 1157 inc r0 > >>>>>> 82C0 E6 1158 mov a,@r0 > >>>>>> 82C1 C0 E0 1159 push acc > >>>>>> 82C3 08 1160 inc r0 > >>>>>> 82C4 E6 1161 mov a,@r0 > >>>>>> 82C5 C0 E0 1162 push acc > >>>>>> 82C7 74 44 1163 mov a,#__str_3 > >>>>>> 82C9 C0 E0 1164 push acc > >>>>>> 82CB 74 7C 1165 mov a,#(__str_3>> 8) > >>>>>> 82CD C0 E0 1166 push acc > >>>>>> 82CF 74 80 1167 mov a,#0x80 > >>>>>> 82D1 C0 E0 1168 push acc > >>>>>> 82D3 12 3D 15 1169 lcall _printf > >>>>>> 82D6 E5 81 1170 mov a,sp > >>>>>> 82D8 24 FA 1171 add a,#0xfa > >>>>>> 82DA F5 81 1172 mov sp,a > >>>>>> 1173 ; > >>>>>> ../../cpu/cc2430/dev/cc2430_rf.c:166: printf("SP %x.\n", SP); > >>>>>> 82DC AD 81 1174 mov r5,_SP > >>>>>> 82DE 7E 00 1175 mov r6,#0x00 > >>>>>> 82E0 C0 05 1176 push ar5 > >>>>>> 82E2 C0 06 1177 push ar6 > >>>>>> 82E4 74 56 1178 mov a,#__str_4 > >>>>>> 82E6 C0 E0 1179 push acc > >>>>>> 82E8 74 7C 1180 mov a,#(__str_4>> 8) > >>>>>> 82EA C0 E0 1181 push acc > >>>>>> 82EC 74 80 1182 mov a,#0x80 > >>>>>> 82EE C0 E0 1183 push acc > >>>>>> 82F0 12 3D 15 1184 lcall _printf > >>>>>> 82F3 E5 81 1185 mov a,sp > >>>>>> 82F5 24 FB 1186 add a,#0xfb > >>>>>> 82F7 F5 81 1187 mov sp,a > >>>>>> > >>>>>> > >>>>> ------------------------------------------------------------------------------ > >>>>> Throughout its 18-year history, RSA Conference consistently attracts the > >>>>> world's best and brightest in the field, creating opportunities for > >>>>> Conference > >>>>> attendees to learn about information security's most important issues > >>>>> through > >>>>> interactions with peers, luminaries and emerging and established > >>>>> companies. > >>>>> http://p.sf.net/sfu/rsaconf-dev2dev > >>>>> _______________________________________________ > >>>>> Sdcc-user mailing list > >>>>> Sdcc-user@lists.sourceforge.net > >>>>> https://lists.sourceforge.net/lists/listinfo/sdcc-user > >>>>> > >>>>> > >>>>> > >>>>> > >>>> ------------------------------------------------------------------------------ > >>>> Throughout its 18-year history, RSA Conference consistently attracts the > >>>> world's best and brightest in the field, creating opportunities for > >>>> Conference > >>>> attendees to learn about information security's most important issues > >>>> through > >>>> interactions with peers, luminaries and emerging and established > >>>> companies. > >>>> http://p.sf.net/sfu/rsaconf-dev2dev > >>>> _______________________________________________ > >>>> Sdcc-user mailing list > >>>> Sdcc-user@lists.sourceforge.net > >>>> https://lists.sourceforge.net/lists/listinfo/sdcc-user > >>>> > >>>> > >>> > >> > >> > >> > >> ------------------------------------------------------------------------------ > >> Throughout its 18-year history, RSA Conference consistently attracts the > >> world's best and brightest in the field, creating opportunities for > >> Conference > >> attendees to learn about information security's most important issues > >> through > >> interactions with peers, luminaries and emerging and established companies. > >> http://p.sf.net/sfu/rsaconf-dev2dev > >> _______________________________________________ > >> Sdcc-user mailing list > >> Sdcc-user@lists.sourceforge.net > >> https://lists.sourceforge.net/lists/listinfo/sdcc-user > >> > > ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Sdcc-user mailing list Sdcc-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sdcc-user