Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AM32 FOR GEPRC STABLE PRO F7 ESC BL32 2-6S 4in1 #24

Open
miguelportilloyaluk opened this issue Jun 25, 2024 · 0 comments
Open

AM32 FOR GEPRC STABLE PRO F7 ESC BL32 2-6S 4in1 #24

miguelportilloyaluk opened this issue Jun 25, 2024 · 0 comments

Comments

@miguelportilloyaluk
Copy link

Hello, I have a GEPRC STABLE PRO F7 stack with the 4 in 1 esc that runs with BLHELI32 firmware (Target: GEPRC-BL32-4IN1). I want to upgrade my esc to AM32 firmware, but I could not find the AM32 target for it. Could someone tell me if there is an AM32 target for the STABLE PRO F7 ESC BL32 2-6S 4in1? Is there anyway you can help me find it?. Thanks. Miguel

tridge added a commit to tridge/AM32 that referenced this issue Aug 19, 2024
the released F421 bootloader does this:

   0x08000b3a:	ldr	r0, [r4, am32-firmware#24]
   0x08000b3c:	str	r0, [r4, am32-firmware#28]
   0x08000b3e:	ldr	r0, [r5, #0]
   0x08000b40:	msr	MSP, r0
   0x08000b44:	ldr	r0, [r4, am32-firmware#28]
   0x08000b46:	ldmia.w	sp!, {r4, r5, r7, lr}
   0x08000b4a:	bx	r0

that writes to the application stack area before jumping. If the
application stack is set to the end of ram then the ldmia instruction
hard faults as it writes past the end of memory

this avoids the issue by only giving the app 15k instead of 16k of
ram. This is not needed when we fix the bootloader to use the right
jump method, which is this:

    // setup sp, msp and jump
    asm volatile(
        "mov sp, %0	\n"
        "msr msp, %0	\n"
        "bx	%1	\n"
	: : "r"(stack_top), "r"(JumpAddress) :);
tridge added a commit to tridge/AM32 that referenced this issue Sep 10, 2024
the released F421 bootloader does this:

   0x08000b3a:	ldr	r0, [r4, am32-firmware#24]
   0x08000b3c:	str	r0, [r4, am32-firmware#28]
   0x08000b3e:	ldr	r0, [r5, #0]
   0x08000b40:	msr	MSP, r0
   0x08000b44:	ldr	r0, [r4, am32-firmware#28]
   0x08000b46:	ldmia.w	sp!, {r4, r5, r7, lr}
   0x08000b4a:	bx	r0

that writes to the application stack area before jumping. If the
application stack is set to the end of ram then the ldmia instruction
hard faults as it writes past the end of memory

this avoids the issue by only giving the app 15k instead of 16k of
ram. This is not needed when we fix the bootloader to use the right
jump method, which is this:

    // setup sp, msp and jump
    asm volatile(
        "mov sp, %0	\n"
        "msr msp, %0	\n"
        "bx	%1	\n"
	: : "r"(stack_top), "r"(JumpAddress) :);
tridge added a commit to tridge/AM32 that referenced this issue Sep 12, 2024
the released F421 bootloader does this:

   0x08000b3a:	ldr	r0, [r4, am32-firmware#24]
   0x08000b3c:	str	r0, [r4, am32-firmware#28]
   0x08000b3e:	ldr	r0, [r5, #0]
   0x08000b40:	msr	MSP, r0
   0x08000b44:	ldr	r0, [r4, am32-firmware#28]
   0x08000b46:	ldmia.w	sp!, {r4, r5, r7, lr}
   0x08000b4a:	bx	r0

that writes to the application stack area before jumping. If the
application stack is set to the end of ram then the ldmia instruction
hard faults as it writes past the end of memory

this avoids the issue by only giving the app 15k instead of 16k of
ram. This is not needed when we fix the bootloader to use the right
jump method, which is this:

    // setup sp, msp and jump
    asm volatile(
        "mov sp, %0	\n"
        "msr msp, %0	\n"
        "bx	%1	\n"
	: : "r"(stack_top), "r"(JumpAddress) :);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant