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

Uninstall/reinstall from source on mac #783

Closed
hierophect opened this issue Mar 18, 2019 · 6 comments
Closed

Uninstall/reinstall from source on mac #783

hierophect opened this issue Mar 18, 2019 · 6 comments

Comments

@hierophect
Copy link

Hello,

My setup is on Mac 10.14.2, STlink2, targeting Bluepill.

I'd like to make modifications to the project source in order to support the full 128k of memory available on the STM32F103C8T6, used on the Bluepill boards, to match the official ST tool and allow me to use platforms like mbed. However, I'm not sure from the project documentation how to perform an uninstall/reinstall from source since it recommends using Homebrew.

I've got the normal st-link program installed, along with all the dependencies like the arm-none-eabi-gc, etc. Is there a simple way that I can uninstall the main program and reinstall the edited version, without touching the dependencies, and without installing the official version off homebrew?

Sorry for the newbie question, I do usually tend to use homebrew for everything, so I'm not that familiar with source installations on mac!

@hierophect
Copy link
Author

hierophect commented Mar 18, 2020

This does not need to be re-opened, the compile from source option for mac is well documented in the compiling manual.

The specific edit I was referencing for the bluepill support is in the src/common.c file, in the stlink_load_device_params() function, in the following text:

} else if (sl->chip_id == STLINK_CHIPID_STM32_L1_CAT2) {
    sl->flash_size = (flash_size & 0xff) * 1024;
} else if ((sl->chip_id & 0xFFF) == STLINK_CHIPID_STM32_L1_HIGH) {
    // 0 is 384k and 1 is 256k
    if ( flash_size == 0 ) {
        sl->flash_size = 384 * 1024;
    } else {
        sl->flash_size = 256 * 1024;
    }
} else {
    sl->flash_size = flash_size * 1024;
}

replacing the final else with

} else {
     sl->flash_size = flash_size * 1024;
     /* HACK for STM21F103C8T6 */
     if (sl->flash_size == 64 * 1024 && getenv("C8T6HACK"))
       sl->flash_size = 128 * 1024;
}

This is soundly a hack however, supporting an undocumented chip feature (albeit one that is a leading source of popularity for the blue pill board).

@Nightwalker-87
Copy link
Member

Well that may be of general interest though as these boards are quite common. So as a maintainer of this project I'd consider this useful and would keep this ticket open for one of the upcoming releases. However this does not imply that you need to keep up with this issue.

@Nightwalker-87 Nightwalker-87 modified the milestones: Feedback required, v1.6.1 Mar 18, 2020
@hierophect
Copy link
Author

@Nightwalker-87 sorry, I only meant to imply that I no longer needed any help on it! If you support adding special cases like the Bluepill that's great.

@Nightwalker-87
Copy link
Member

Nightwalker-87 commented Mar 19, 2020

I understand. So I will close this as resolved then.

Note on Bluepill-Support: For 128k support also take a look at issue #516. As far as I am aware of, the tools currently support the STM32F103C8T6 as an original device.
We should not recycle this issue here with a different topic than the original one.

@hierophect
Copy link
Author

I'll make a new issue on this today

@Nightwalker-87
Copy link
Member

You may add a comment to #516, which already covers this.

@stlink-org stlink-org locked as resolved and limited conversation to collaborators Apr 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants